Document /mintlify-assets and /_mintlify routing for subpath proxies#6687
Open
aicortez wants to merge 1 commit into
Open
Document /mintlify-assets and /_mintlify routing for subpath proxies#6687aicortez wants to merge 1 commit into
aicortez wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
ethanpalm
approved these changes
Jul 21, 2026
ethanpalm
left a comment
Collaborator
There was a problem hiding this comment.
one small suggestion to make the warning a little easier to read. lgtm!
| ``` | ||
|
|
||
| <Warning> | ||
| In addition to your subpath, your Worker must proxy `/mintlify-assets/*`, which serves the CSS, JavaScript, and favicons for your documentation, and `/_mintlify/*`, which handles API playground requests. These paths are requested from the root of your domain, not your subpath. If you route traffic to your Worker with route patterns instead of a custom domain, add routes for `yoursite.com/mintlify-assets/*` and `yoursite.com/_mintlify/*` alongside your subpath route. |
Collaborator
There was a problem hiding this comment.
Suggested change
| In addition to your subpath, your Worker must proxy `/mintlify-assets/*`, which serves the CSS, JavaScript, and favicons for your documentation, and `/_mintlify/*`, which handles API playground requests. These paths are requested from the root of your domain, not your subpath. If you route traffic to your Worker with route patterns instead of a custom domain, add routes for `yoursite.com/mintlify-assets/*` and `yoursite.com/_mintlify/*` alongside your subpath route. | |
| In addition to your subpath, your Worker must proxy `/mintlify-assets/*`, which serves the CSS, JavaScript, and favicons for your documentation, and `/_mintlify/*`, which handles API playground requests. | |
| If you route traffic to your Worker with route patterns instead of a custom domain, add routes for `yoursite.com/mintlify-assets/*` and `yoursite.com/_mintlify/*` alongside your subpath route. These paths must originate from the root of your domain, not your subpath. |
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
Subpath reverse proxies must forward two root-level paths to
<subdomain>.mintlify.sitein addition to the docs subpath:/mintlify-assets/*— CSS/JS chunks and favicons are emitted with a root-relative asset prefix, so they are requested from the domain root, not the subpath. Without this, docs render unstyled with broken scripts./_mintlify/*— the API playground posts to/_mintlify/api/requestat the domain root.The Vercel guide's config generator already includes both rewrites, but the Cloudflare Workers guide covered neither (a customer had to discover the assets route themselves), and the AWS guide only covered
/mintlify-assets/_next/static/*, which misses favicons and the playground path.Changes:
deploy/cloudflare.mdx: both example Worker scripts now match/mintlify-assets/and/_mintlify/; added a warning about covering these paths in Worker routes when not using a custom domain.deploy/route53-cloudfront.mdx: widened/mintlify-assets/_next/static/*to/mintlify-assets/*and added a/_mintlify/*behavior (CachingDisabled, all HTTP methods).Note: the dashboard-generated Worker snippet (
AdditionalSettings.tsxin mint) has the same gap and needs a separate fix.Test Plan
mint broken-linkspasses./mintlify-assets/...at the domain root, and the API playground posts to root-level/_mintlify/api/request(useSendPlaygroundRequest.ts).🤖 Generated with Claude Code
Note
Low Risk
Documentation-only updates to deployment guides; no application code, auth, or data handling changes.
Overview
Subpath reverse-proxy guides are updated so Mintlify’s root-level asset and API paths are forwarded to
<subdomain>.mintlify.site, not only/docs.Cloudflare Workers (
deploy/cloudflare.mdx): both example Worker scripts now proxy when the path matches/docs,/mintlify-assets/, or/_mintlify/. A new Warning explains these routes hit the domain root (not the subpath) and that route-pattern setups must includeyoursite.com/mintlify-assets/*andyoursite.com/_mintlify/*.AWS Route 53 / CloudFront (
deploy/route53-cloudfront.mdx): the overview widens cached routing from/mintlify-assets/_next/static/*to/mintlify-assets/*(CSS, JS, favicons) and adds/_mintlify/*under CachingDisabled with full HTTP methods for the API playground. Step-by-step behavior sections document/mintlify-assets/*and/_mintlify/*origins to the Mintlify site.Reviewed by Cursor Bugbot for commit e795d7a. Bugbot is set up for automated code reviews on this repo. Configure here.