Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Serve more folders containing files with hashed filenames directly from nginx with a max expiration date. Additionally, some unhashed static files are allowed to be cached for up to 1 day. These changes serve as a workaround for an authentication issue. Currently `conduit-cookie` includes a `Set-Cookie` header in every backend response. During the authentication steps, the popup window requests static assets such as `favicon.ico` and `cargo-{hash}.png`. If these assets are served by the backend, they will echo whatever cookie was sent in the request. Therefore, there is a race between the request to `/api/private/session/authorize?...` and requests for these static assets. If a request for one of these assets is sent before authorization is complete and the response arrives after successful authorization, then the stale cookie will be stored again by the browser, overwriting the contents. I've opened conduit-rust/conduit-cookie#12 to track the progress of the proposed long-term solution. This commit should be sufficient to fix the behavior for now and should reduce the number of requests for these static assets (due to improved caching). Closes #2252 r? @carols10cents
- Loading branch information