Skip to content

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

Open
aicortez wants to merge 2 commits into
mainfrom
alejandro/subpath-proxy-asset-paths
Open

Document /mintlify-assets and /_mintlify routing for subpath proxies#6687
aicortez wants to merge 2 commits 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 changes to deployment guides; no application code or infrastructure behavior in this repo.

Overview
Subpath reverse-proxy docs now require forwarding root-level /mintlify-assets/* and /_mintlify/* to Mintlify, not only the docs subpath—without them, styled assets and the API playground break.

Cloudflare Workers (deploy/cloudflare.mdx): both example Worker scripts proxy those paths alongside /docs; a new warning explains why they’re needed and that route patterns must include yoursite.com/mintlify-assets/* and yoursite.com/_mintlify/* when not using a custom domain.

AWS CloudFront (deploy/route53-cloudfront.mdx): overview and behaviors widen cached routing from /mintlify-assets/_next/static/* to /mintlify-assets/*, and add a /_mintlify/* behavior (caching disabled, all HTTP methods) for playground API traffic.

Reviewed by Cursor Bugbot for commit 936226a. 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 Outdated
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