fix(ci): drop x-vercel-set-bypass-cookie=true from wait-action path
The wait-action's healthcheck was still 401ing despite the bypass query being correct. Root cause: with `x-vercel-set-bypass-cookie=true`, Vercel returns 307 + Set-Cookie (`_vercel_jwt`), but axios in Node has no cookie jar — it follows the redirect to the bare URL without the cookie, which then 401s. Local verification (run by operator): curl -sI "https://<preview>/?x-vercel-protection-bypass=<secret>" | head -1 → HTTP/2 200 (works, no cookie needed) curl -sI "https://<preview>/?x-vercel-protection-bypass=<secret>&x-vercel-set-bypass-cookie=true" | head -1 → HTTP/2 307 (the redirect-without-cookie path that breaks axios) For a one-shot healthcheck, the per-request bypass query is enough. The cookie variant stays reserved for the future Playwright config (adopt-playwright-smoke) where a real browser cookie jar exists. Added an inline comment in preview-smoke.yml explaining this so the next agent doesn't accidentally re-add the cookie param. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b6f8688df8
commit
043a6ee78a
2 changed files with 10 additions and 2 deletions
9
.github/workflows/preview-smoke.yml
vendored
9
.github/workflows/preview-smoke.yml
vendored
|
|
@ -75,7 +75,14 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_timeout: 120
|
||||
path: /?x-vercel-protection-bypass=${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}&x-vercel-set-bypass-cookie=true
|
||||
# NOTE: do NOT add `&x-vercel-set-bypass-cookie=true` here. Vercel
|
||||
# responds to that with a 307 + Set-Cookie (`_vercel_jwt`), but
|
||||
# axios in Node has no cookie jar — the cookie is dropped before
|
||||
# the followup request, which then 401s. For this one-shot
|
||||
# healthcheck the bare bypass query is enough; the cookie variant
|
||||
# belongs in the future Playwright config where the browser does
|
||||
# have a cookie jar.
|
||||
path: /?x-vercel-protection-bypass=${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
|
|
|
|||
3
.github/workflows/visual-diff.yml
vendored
3
.github/workflows/visual-diff.yml
vendored
|
|
@ -67,7 +67,8 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_timeout: 120
|
||||
path: /?x-vercel-protection-bypass=${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}&x-vercel-set-bypass-cookie=true
|
||||
# See preview-smoke.yml for the no-`set-bypass-cookie` rationale.
|
||||
path: /?x-vercel-protection-bypass=${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue