Skip to content

feat(void): add basic auth middleware - #216

Merged
cpojer merged 1 commit into
mainfrom
basic-auth-gate
Jun 8, 2026
Merged

cpojer merged 1 commit into
mainfrom
basic-auth-gate

Conversation

@TheAlexLichter

@TheAlexLichter TheAlexLichter commented Jun 7, 2026 •

Copy link
Copy Markdown
Member

When I tried to re-implement Basic authentication via a middleware I noticed that I needed internal knowledge (e.g. that _void/* paths need to be unprotected). This makes it harder for users.

Instead, this PR provides a built-in basic auth helper that considers this already.

@netlify

netlify Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for staging-void-cloud failed.

Name Link
🔨 Latest commit 6f631f2
🔍 Latest deploy log https://app.netlify.com/projects/staging-void-cloud/deploys/6a25ea110bab8e0008d7b160

@TheAlexLichter
TheAlexLichter marked this pull request as ready for review June 7, 2026 22:02
@TheAlexLichter
TheAlexLichter requested a review from cpojer June 7, 2026 22:02
@cpojer
cpojer merged commit a22074d into main Jun 8, 2026
6 of 10 checks passed
@cpojer
cpojer deleted the basic-auth-gate branch June 8, 2026 02:23
cpojer pushed a commit that referenced this pull request Sep 11, 2026
…ation fails (#216)

* fix(api): surface the real reason when migration v2 capability negotiation fails

When a manifest declares migration protocolVersion 2 but the worker
capability probe does not confirm a matching v2 capability, the deploy threw
a bare "migration protocol v2 capability negotiation failed" with no reason —
and the value-mismatch (skew) path logged nothing at all.

Make `probeWorkerMigrationCapabilities` return a discriminated
{ ok:true, caps } | { ok:false, reason } result that captures the HTTP status
plus the worker error body (or CF asset stub / non-JSON / request failure).
The caller composes a concrete reason (probe reason, or a field-by-field
capability-vs-manifest diff), logs `capability_negotiation_failed`, and throws
`...failed: <reason>`, which flows to both the deploy error event and the
persisted deployments.error.

Diagnostics only — this does not by itself fix a failing deploy. The SPA
asset-fallback bug it surfaced is fixed in #250.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump framework submodule to void#250 (SPA /__void routing fix)

Advances framework de1d581 -> 8fc0db3 (void main), which includes the
merged #250: SPA + API apps — and cron/queue-only SPAs with
D1 migrations — now route /__void/* to the worker before the SPA asset
fallback, so migration protocol v2 capability negotiation reaches the
migration handler instead of receiving index.html.

Also pulls in the already-merged #247, #249, and v0.10.3 / v0.10.4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants