Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions guides/reverse-proxy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
| `/.well-known/acme-challenge/*` | `<your-subdomain>.mintlify.app` | No cache |
| `/.well-known/vercel/*` | `<your-subdomain>.mintlify.app` | No cache |
| `/mintlify-assets/_next/static/*` | `<your-subdomain>.mintlify.app` | Cache enabled |
| `/_mintlify/*` | `<your-subdomain>.mintlify.app` | No cache |
| `/*` | `<your-subdomain>.mintlify.app` | No cache |
| `/` | `<your-subdomain>.mintlify.app` | No cache |

Expand All @@ -29,12 +30,12 @@

- **Origin**: Contains the target subdomain `<your-subdomain>.mintlify.app`
- **X-Forwarded-For**: Preserves client IP information
- **X-Forwarded-Proto**: Preserves original protocol (HTTP/HTTPS)

Check warning on line 33 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L33

Use parentheses judiciously.
- **X-Real-IP**: Forwards the real client IP address
- **User-Agent**: Forwards the user agent

<Warning>
Ensure that the `Host` header is not forwarded

Check warning on line 38 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L38

Use 'isn't' instead of 'is not'.
</Warning>

## Example nginx configuration
Expand Down Expand Up @@ -83,6 +84,19 @@
add_header Cache-Control "public, max-age=86400";
}

# Mintlify-specific paths
location ~ ^/_mintlify/ {
proxy_pass https://<your-subdomain>.mintlify.app;
proxy_set_header Origin <your-subdomain>.mintlify.app;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header User-Agent $http_user_agent;

# Disable caching for Mintlify paths
add_header Cache-Control "no-cache, no-store, must-revalidate";
}

# Root path
location = / {
proxy_pass https://<your-subdomain>.mintlify.app;
Expand Down Expand Up @@ -115,9 +129,9 @@

### 404 error

**Symptoms**: Documentation loads, but features don't work. API calls fail.

Check warning on line 132 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L132

': D' should be in lowercase.

**Cause**: `Host` header is being forwarded or `Origin` header is missing.

Check warning on line 134 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L134

In general, use active voice instead of passive voice ('being forwarded').

**Solution**:

Expand All @@ -126,8 +140,8 @@

### Performance issues

**Symptoms**: Slow page loads and layout shifts.

Check warning on line 143 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L143

': S' should be in lowercase.

**Cause**: Incorrect caching configuration.

Check warning on line 145 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L145

': I' should be in lowercase.

**Solution**: Enable caching only for `/mintlify-assets/_next/static/*` paths.

Check warning on line 147 in guides/reverse-proxy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/reverse-proxy.mdx#L147

': E' should be in lowercase.
Loading