Skip to content

Static files: set Expires header from configured cache time#2515

Open
ericel wants to merge 1 commit into
drogonframework:masterfrom
ericel:fix/static-expires-header
Open

Static files: set Expires header from configured cache time#2515
ericel wants to merge 1 commit into
drogonframework:masterfrom
ericel:fix/static-expires-header

Conversation

@ericel
Copy link
Copy Markdown

@ericel ericel commented May 10, 2026

Replace hardcoded Expires header (epoch) with a computed Expires based on StaticFileRouter::staticFilesCacheTime_. This allows proper caching of static files when static file cache time is set.\n\nFiles changed:\n- lib/src/StaticFileRouter.cc\n\nBehavior: Expires is set to now + staticFilesCacheTime_ seconds (only when >0).

@an-tao
Copy link
Copy Markdown
Member

an-tao commented May 11, 2026

@ericel Thanks for your patch, please rebase onto the last version.

@ericel ericel force-pushed the fix/static-expires-header branch from 07195d1 to 677593f Compare May 11, 2026 03:45
@ericel
Copy link
Copy Markdown
Author

ericel commented May 11, 2026

Rebased onto latest \ and force-pushed. This PR now contains only the Expires-header fix on top of current upstream.

@ericel
Copy link
Copy Markdown
Author

ericel commented May 11, 2026

Rebased onto latest master and force-pushed. This PR now contains only the Expires-header fix on top of current upstream.

@ericel ericel force-pushed the fix/static-expires-header branch from 677593f to 78ecd24 Compare May 11, 2026 08:06
@ericel ericel force-pushed the fix/static-expires-header branch from 78ecd24 to 2674e19 Compare May 11, 2026 08:07
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.

2 participants