betty icon indicating copy to clipboard operation
betty copied to clipboard

Do not issue permanent redirects for unlocalized 404s

Open bartfeenstra opened this issue 1 year ago • 0 comments

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.

bartfeenstra avatar Jul 05 '22 00:07 bartfeenstra