Fix/cloudflare 525 fallback ssl - #312
Open
farrasrayhand wants to merge 17 commits into
Open
Conversation
…nal helpers, webhook SSRF validation
…ve test dependency issues
…id YAML parse error
…regex doesn't support nested braces
…r compat) GNU tar does not support --no-absolute-names; it strips absolute paths by default. The pre-extraction assertTarEntriesSafe already validates all entry paths for traversal attacks.
…blicWebhookUrl - Replace assertPublicWebhookUrl call with assertPublicUrlLiteral from ssrf-guard - Delete redundant webhook-url.ts and its test - Add 22 ssrf-guard tests covering isPrivateIp, isBlockedHostname, assertPublicHostLiteral, assertPublicUrlLiteral
…eFetch already handles SSRF internally
farrasrayhand
force-pushed
the
fix/cloudflare-525-fallback-ssl
branch
4 times, most recently
from
July 30, 2026 03:27
5be44d2 to
5bb9cdf
Compare
…esolve Cloudflare 525
farrasrayhand
force-pushed
the
fix/cloudflare-525-fallback-ssl
branch
from
July 30, 2026 03:28
5bb9cdf to
ecdab52
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
Adds a self-signed fallback TLS certificate for custom domains during the pending SSL provision phase so Cloudflare Proxied domains (in Full / Full Strict mode) can complete TLS handshakes without hitting Error 525.
Motivation
When a newly created custom domain is proxied through Cloudflare (Orange Cloud) with SSL mode set to Full or Full (Strict), Cloudflare attempts a TLS handshake on port 443 with the origin server. Previously, OpenResty omitted a 443 server block for pending/unissued domains, falling back to
ssl_reject_handshake on;, which caused Cloudflare to return Error 525 (SSL Handshake Failed) and prevented Let's Encrypt HTTP-01 challenge completion behind Cloudflare.Related issue
#308
Changes
ensureFallbackCert()helper to generate a fallback self-signed TLS certificate under_fallback/fullchain.pemwhen a real Let's Encrypt cert is not yet present on disk.registerRoute()so that whenroute.tlsis true but real certs are not yet provisioned, OpenResty emits alisten 443 ssl;server block using the fallback cert alongsidelisten 80;.registerRoute()seamlessly replaces the fallback block with the official certificate.pending SSL fallback TLS for Cloudflare proxy compatibilityto verify that fallback 443 server blocks are properly generated for unprovisioned TLS routes.Verification
Checklist
bun run test,bun run --cwd <workspace> lint, andbun formatall pass locally