0.3.3 #16

Merged
ric merged 5 commits from 0.3.3 into main 2026-02-11 21:17:20 +00:00
Owner

Bring in the disable site features

Bring in the disable site features
When a user sets enabled: false in their .pages file, the site now
stops being served and all cached data (custom domain mappings, Traefik
router configs, branch subdomains, redirect middleware) is cleaned up.

- Add deregisterTraefikRouter to remove router keys from Redis
- Add deregisterSite to clean up all cached entries for disabled sites
- Add cleanupRedirectMiddleware to remove redirect middleware keys
- Check enabled field in ServeHTTP for both custom domain and pages
  domain paths, returning 404 for disabled sites
- Replace HasPagesFile with GetPagesConfig in ServeHTTP to avoid
  double API call and enable the enabled check
- Update reaper.py to check enabled: false and fix key casing bugs
  (entryPoints, certResolver) and add missing entryPoints/1 key
- Add tests for deregistration and disabled site behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds DeleteByPrefix to the Cache interface so that deregisterSite() can
immediately purge all cached content for a disabled site, eliminating the
window where stale content could be served from cache. Also updates
documentation for v0.3.3 with details on the enabled: false behavior,
reaper improvements, and version references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The enabled check was after the content cache lookup, so disabled sites
could still be served from cache for up to 5 minutes. Now caches the
enabled status in passwordCache (60s TTL) and checks it before the
content cache on both pages domain and custom domain paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the enabled check before the password check and content cache so
disabled sites are caught on the very first request. Previously, cached
content and password checks ran first, which meant deregisterSite never
ran while content was cached. Also clean up settings and enabled cache
keys during deregistration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ric merged commit 0781bfc9b1 into main 2026-02-11 21:17:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SquareCows/pages-server!16
No description provided.