Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): cache-control header missing from / requests #10131

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

michelheusschen
Copy link
Contributor

@michelheusschen michelheusschen commented Jun 11, 2024

Just ran into the same issue @alextran1502 had a couple of days ago where requests are being made to the old user endpoint. Turns out requests to / are missing the cache-control header, because sirv runs first and will serve index.html that browsers can cache.

Fixed by disabling extension fallback (defaults to ['html', 'htm'])

@jrasm91
Copy link
Contributor

jrasm91 commented Jun 11, 2024

I am pretty sure this won't work. The static file serving needs to run first so we know if we need to fall back to the index.html page or not.

@jrasm91
Copy link
Contributor

jrasm91 commented Jun 11, 2024

This now basically returns the index.html page for every web request.

@michelheusschen
Copy link
Contributor Author

Updated to disable extension fallback (defaults to ['html', 'htm'])

@michelheusschen michelheusschen linked an issue Jun 11, 2024 that may be closed by this pull request
3 tasks
@alextran1502 alextran1502 merged commit 3a3676b into main Jun 11, 2024
23 checks passed
@alextran1502 alextran1502 deleted the fix/server-cache-control-missing branch June 11, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants