Repository navigation
Conversation
Production fell back to http://localhost:5173, which then received credentialed CORS, passed the CSRF origin guard and was an accepted post-login redirect target. Unset now means same-origin only. Signed-off-by: ashish <ashish.thapa477@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production served
access-control-allow-origin: http://localhost:5173becauseWEB_ORIGINdefaulted to the dev origin. That same value is also on the CSRF origin allowlist and the post-login redirect allowlist, so in production a page on a visitor's ownlocalhost:5173got credentialed CORS, passed the CSRF guard, and was an accepted redirect target.WEB_ORIGINis optional with no default.assertSameOrigin; redirects allow only the API origin..env.exampleandvitest.config.mtsalready set it explicitly.Verified: typecheck, biome, full vitest suite (155 tests) pass. New tests cover no default in
parseEnvand redirects with no frontend origin.After merge, redeploy on Dokploy; no env change needed (WEB_ORIGIN stays unset).