betty
betty copied to clipboard
Do not issue permanent redirects for unlocalized 404s
nginx.conf.j2
is configured so that if the site is multilingual and a request to a static (non-localized) path yields an HTTP 404 Not Found response, clients are issued an HTTP 301 Moved Permanently.
This is problematic for two reasons:
- localized redirects are request-specific, and not just path-specific
- when static files accidentally do not exist, such as during development, permanent redirects require extra developer-time to clear caches
Instead, issue HTTP 307 Temporary Redirect responses.