fix: switch to adapter-vercel and fix CSP nonce mismatch#464
Open
tazmeen24 wants to merge 1 commit into
Open
Conversation
CI Results — ❌ Some checks failed🖥️ Backend (⏭️ skipped)
📱 Mobile (⏭️ skipped)
🌐 Web (❌ failure)
🕐 Last updated: |
235427b to
85e8bd6
Compare
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.
Summary
Fixes blank page on Vercel caused by CSP nonce mismatch. Switches from
adapter-auto+ nonce-based CSP toadapter-vercel+ hash-based CSP, which is stable on serverless.Closes #404
Type of Change
What Changed
@sveltejs/adapter-auto→@sveltejs/adapter-vercel'auto'→'hash''unsafe-inline'fromscript-src'http://localhost:3000'toconnect-srcfor local devBefore
After
How to Test
cd apps/web pnpm run build pnpm run previewVerify: JS files load in Network tab, page renders (not blank)
Checklist
Additional Context
Backend CORS is hardcoded to
localhost:5173(the dev server port). The preview runs on port4173instead. For local testing, either:localhost:4173, ORpnpm devto run web onlocalhost:5173(This is a separate backend issue, not CSP-related)