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

HTTP 304 even when ETag different with If-None-Match #29353 #2785

Open
suningkooboo opened this issue Oct 11, 2024 · 0 comments
Open

HTTP 304 even when ETag different with If-None-Match #29353 #2785

suningkooboo opened this issue Oct 11, 2024 · 0 comments

Comments

@suningkooboo
Copy link

Environment

Reproduction

I write minimal reproduction here:
https://stackblitz.com/edit/github-ajxlmh?file=server%2Froutes%2Findex.ts

I found it's hard to test directly on this minimal reproduction but it can indicate how bug work. Two files:

server/routes/index.ts to proxy to different output
nuxt.config.ts to enable SWR.

Describe the bug

I write a server middleware to proxyRequest to different page render for login (A) and guest (B) user in same URL. The login/guest status is judged by an auth cookie. I enable routeRules swr=true.

  1. Visit home page on login status and get version A.
  2. logout (delete cookie) and visit home page. Server will respond 304 even when response ETag (B) different with request If-None-Match (A).

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant