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

HEAD request 404s for all static files #46

Open
kylecordes opened this issue Mar 14, 2025 · 0 comments
Open

HEAD request 404s for all static files #46

kylecordes opened this issue Mar 14, 2025 · 0 comments

Comments

@kylecordes
Copy link

Current behavior

A HEAD request for a static file, any static file, returns a 404.

Expected behavior

A HEAD request should return exactly the same response headers as a GET for the same resource, but without the content. 404ing a HEAD request is extremely unusual for web servers, going back to the beginning of the web.

Consequences

When working locally in development, this difference is rarely noticed - other than every once in a while a bit of jankiness where it seems a page needs to be reloaded unnecessarily. In production deployment, web caches will sometimes try a HEAD first, and therefore create a very difficult to track down bug in which static resources appear to sometimes be missing.

It probably would be best to fix this issue in Elysia itself, but in the meantime, a fix for static file serving would be good.

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

No branches or pull requests

1 participant