Conversation
## Current Behavior /blog and /changelog paths are always served by the Next.js app. ## Expected Behavior When the `BLOG_URL` env var is set in Netlify, /blog/*, /changelog/* are proxied to the standalone blog site (e.g. nrwl-blog.netlify.app). When unset, behavior is unchanged — paths fall through to Next.js. The proxy runs in the existing Netlify edge function alongside the Framer proxy, using `beforeFiles` semantics to override local routes. Includes URL rewriting (blogUrl → nx.dev) and security headers. ## Related Issue(s) Fixes DOC-455
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit fd2b6b7
☁️ Nx Cloud last updated this comment at |
## Current Behavior Browsers request /favicon.ico but the file lives at /favicon/favicon.ico, resulting in a 404. ## Expected Behavior /favicon.ico redirects to /favicon/favicon.ico and serves correctly.
barbados-clemens
approved these changes
Mar 27, 2026
FrozenPandaz
pushed a commit
that referenced
this pull request
Mar 31, 2026
…35043) ## Current Behavior `/blog` and `/changelog` paths are always served by the Next.js app. The Netlify edge function excludes these paths (`/blog/*` in `excludedPath`, `/blog` and `/changelog` in `nextjsPaths`) so they bypass the Framer proxy and fall through to Next.js. ## Expected Behavior When the `BLOG_URL` env var is set in Netlify, `/blog/*` and `/changelog/*` requests are proxied to the standalone blog site (e.g., `nrwl-blog.netlify.app`) via the existing Netlify edge function. When `BLOG_URL` is **not** set, behavior is unchanged — paths fall through to Next.js as before. **Changes to `netlify/edge-functions/rewrite-framer-urls.ts`:** - Read `BLOG_URL` env var - Conditionally remove `/blog` and `/changelog` from `nextjsPaths` when `BLOG_URL` is set - Remove `/blog/*` and `/changelog` from static `excludedPath` so the edge function can intercept these paths - Add blog proxy branch: when `BLOG_URL` is set and path matches, proxy to blog site with URL rewriting (`blogUrl` → `https://nx.dev`) and security headers (`X-Frame-Options`, `CSP`) - When `BLOG_URL` is unset, blog/changelog paths fall through to Next.js via explicit `context.next()` guard **Asset resolution note:** The edge function only handles `text/html` requests. Blog site assets (CSS, JS) will need to be served from the blog site's own CDN (via `build.assetsPrefix` or equivalent in the blog repo). All existing `/_next/*` assets remain in `excludedPath` and are unaffected. ## Related Issue(s) Fixes DOC-455 (cherry picked from commit a8b5d04)
jaysoo
added a commit
that referenced
this pull request
Apr 1, 2026
…35043) ## Current Behavior `/blog` and `/changelog` paths are always served by the Next.js app. The Netlify edge function excludes these paths (`/blog/*` in `excludedPath`, `/blog` and `/changelog` in `nextjsPaths`) so they bypass the Framer proxy and fall through to Next.js. ## Expected Behavior When the `BLOG_URL` env var is set in Netlify, `/blog/*` and `/changelog/*` requests are proxied to the standalone blog site (e.g., `nrwl-blog.netlify.app`) via the existing Netlify edge function. When `BLOG_URL` is **not** set, behavior is unchanged — paths fall through to Next.js as before. **Changes to `netlify/edge-functions/rewrite-framer-urls.ts`:** - Read `BLOG_URL` env var - Conditionally remove `/blog` and `/changelog` from `nextjsPaths` when `BLOG_URL` is set - Remove `/blog/*` and `/changelog` from static `excludedPath` so the edge function can intercept these paths - Add blog proxy branch: when `BLOG_URL` is set and path matches, proxy to blog site with URL rewriting (`blogUrl` → `https://nx.dev`) and security headers (`X-Frame-Options`, `CSP`) - When `BLOG_URL` is unset, blog/changelog paths fall through to Next.js via explicit `context.next()` guard **Asset resolution note:** The edge function only handles `text/html` requests. Blog site assets (CSS, JS) will need to be served from the blog site's own CDN (via `build.assetsPrefix` or equivalent in the blog repo). All existing `/_next/*` assets remain in `excludedPath` and are unaffected. ## Related Issue(s) Fixes DOC-455
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Current Behavior
/blogand/changelogpaths are always served by the Next.js app. The Netlify edge function excludes these paths (/blog/*inexcludedPath,/blogand/changeloginnextjsPaths) so they bypass the Framer proxy and fall through to Next.js.Expected Behavior
When the
BLOG_URLenv var is set in Netlify,/blog/*and/changelog/*requests are proxied to the standalone blog site (e.g.,nrwl-blog.netlify.app) via the existing Netlify edge function. WhenBLOG_URLis not set, behavior is unchanged — paths fall through to Next.js as before.Changes to
netlify/edge-functions/rewrite-framer-urls.ts:BLOG_URLenv var/blogand/changelogfromnextjsPathswhenBLOG_URLis set/blog/*and/changelogfrom staticexcludedPathso the edge function can intercept these pathsBLOG_URLis set and path matches, proxy to blog site with URL rewriting (blogUrl→https://nx.dev) and security headers (X-Frame-Options,CSP)BLOG_URLis unset, blog/changelog paths fall through to Next.js via explicitcontext.next()guardAsset resolution note: The edge function only handles
text/htmlrequests. Blog site assets (CSS, JS) will need to be served from the blog site's own CDN (viabuild.assetsPrefixor equivalent in the blog repo). All existing/_next/*assets remain inexcludedPathand are unaffected.Related Issue(s)
Fixes DOC-455