Repository navigation
chore(vercel): move the /docs redirects and headers from nginx - #4932
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ShaneK
approved these changes
Dec 3, 2026
This branch was successfully deployed
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.
Vercel challenges docs visitors because every request reaches it through our nginx proxy, from a few IPs. The fix is to have Cloudflare send
/docsstraight to Vercel, but nginx also holds the/docsredirects and security headers. This moves them here first, so the switch changes nothing for visitors.{/}?entry, and its 12 pattern rules/docs/developer-resources/*paths would go to ionic.io/resources instead of the v3 docsContent-Security-Policyheaders nginx sets on/docs/docs/v1to/docs/v6and their redirects on nginxX-Robots-Tag, which depends on the host Cloudflare sends, so it belongs to the switch itselfThe source is
ionic-team/ionic-nginx(internal) at2fb25cfff:config/redirects.conf: the redirects, every/docsrule except those under/docs/v1to/docs/v6config/templates/default.conf.template: the CSP headers, and the/docs/v1to/docs/v6locations that stay on nginxNothing changes while nginx is in front: its rules match first, and the duplicate CSP headers are identical. I compared nginx plus the current
vercel.jsonagainst the new one for 2,475 paths (every redirect source with and without the slash, plus every built page), and all resolve the same. Requesting all of them from the preview gave the same result: 0 mismatches.How to test
On the preview:
/docs//docs/docs/angular/config//docs/developing/config/docs/2.0.0-beta.1/api/docs/v3/2.0.0/api/docs/enterprise/barcodehttps://ionic.io/docs/premier-plugins/barcode/docs/developer-resources/forms/docs/v3/developer-resources/forms/docs/v7/api/button/docs/api/button(temporary)curl -sI <preview>/docs | grep -i content-securityprints the three CSP headers.