Repository navigation
Conversation
…ources
Three vercel.json→static-web-server translation bugs broke static
deploys that set headers, rewrites, or SPA fallback:
- headers emitted [[advanced.headers.headers]] arrays of {key,value}
pairs; SWS expects a single [advanced.headers.headers] name→value map
- SERVER_PAGE_FALLBACK env is ignored by SWS 2.x; the fallback only
takes effect via the config file, so emit it whenever spa_fallback
is set
- SWS `source` patterns are globs, not Vercel regex — "/(.*)" now
translates to "/**" for headers, rewrites, and redirects
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Mira PR WalkthroughThis PR fixes the worker's translation of static site deployment configuration into a valid static-web-server (SWS) configuration. It corrects the headers TOML structure, emits SPA fallback as a Confidence: 4/5 ◉◉◉◉○ Safe to merge
❌ Review failed — click for detailsThe code review failed to complete due to an unexpected error. Stage: Code review
|
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
Three SWS (static-web-server) config bugs found during the Vercel estate migration — every fix is verified live on the waw instance running a v1.1.3 image built from this branch:
[[headers]]shape; translated to the form SWS accepts.SERVER_PAGE_FALLBACKignored — SWS 2.x no longer honors the env var; SPA fallback now emitted as a properpage_fallbackconfig entry (verified:/loginon bookrademo returns the shell).sourcepatterns emitted in regex form; converted to glob semantics SWS matches on.Without this, static deploys either crash SWS at startup or serve 404s on deep links — i.e. every SPA in the estate breaks in exactly the way Vercel users expect to work.
Test plan
/loginverified; relay-landing custom headers verified.Generated with Devin