Skip to content

Clarify default Cache-Control header - #1402

Merged
victorlin merged 1 commit into
masterfrom
victorlin/cache
Oct 26, 2026
Merged

victorlin merged 1 commit into
masterfrom
victorlin/cache

Conversation

@victorlin

@victorlin victorlin commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

#1401 wrongly assumed that this setting took precedence over other handlers. In fact it's the other way around – this is the baseline that is overridden by other handlers. nevermind... see #1403

Checklist

"Prevent CDN caching on most routes" (9e16e78) wrongly assumed that
this setting took precedence over other handlers. In fact it's the other
way around – this is the baseline that is overridden by other handlers.

Updated the comment and simplified the logic.
@victorlin victorlin self-assigned this Oct 26, 2026
Comment thread src/routing/setup.js
* Specific handlers (e.g. for static assets) can override this.
*/
app.use((req, res, next) => {
if (!req.path.startsWith("/_next/static/") && !req.path.startsWith("/dist/")) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, pages/assets through Next.js are handled externally and Auspice is handed here:

const auspiceAssets = expressStaticGzip(auspiceAssetPath(), {maxAge: '30d'});

@victorlin
victorlin merged commit cceff2b into master Oct 26, 2026
16 of 17 checks passed
@victorlin
victorlin deleted the victorlin/cache branch October 26, 2026 19:55
@victorlin victorlin mentioned this pull request Oct 26, 2026
1 of 2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant