Skip to content

Document /mintlify-assets and /_mintlify routing for subpath proxies#6687

Open
aicortez wants to merge 1 commit into
mainfrom
alejandro/subpath-proxy-asset-paths
Open

Document /mintlify-assets and /_mintlify routing for subpath proxies#6687
aicortez wants to merge 1 commit into
mainfrom
alejandro/subpath-proxy-asset-paths

Conversation

@aicortez

@aicortez aicortez commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Subpath reverse proxies must forward two root-level paths to <subdomain>.mintlify.site in 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/request at 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.tsx in mint) has the same gap and needs a separate fix.

Test Plan

  • mint broken-links passes.
  • Verified live: a subpath deployment's HTML references /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 include yoursite.com/mintlify-assets/* and yoursite.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.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟢 Ready View Preview Jul 21, 2026, 5:05 PM

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟢 Ready View Preview Jul 21, 2026, 5:05 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟡 Building Jul 21, 2026, 5:03 PM

@mintlify

mintlify Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟡 Building Jul 21, 2026, 5:03 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ethanpalm ethanpalm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small suggestion to make the warning a little easier to read. lgtm!

Comment thread deploy/cloudflare.mdx
```

<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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants