You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced/subpath/cloudflare.mdx
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,25 @@ Create a Cloudflare Worker by following the [Cloudflare Workers getting started
19
19
If your DNS provider is Cloudflare, do not use proxying for the CNAME record.
20
20
</Warning>
21
21
22
+
### Proxies with Vercel deployments
23
+
24
+
If you use Cloudflare as a proxy with Vercel deployments, you must ensure proper configuration to avoid conflicts with Vercel's domain verification and SSL certificate provisioning.
25
+
26
+
Improper proxy configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.
27
+
28
+
#### Required path allowlist
29
+
30
+
Your Cloudflare Worker must allow traffic to these specific paths without blocking or redirecting:
31
+
32
+
-`/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
33
+
-`/.well-known/vercel/*` - Required for Vercel domain verification
34
+
35
+
While Cloudflare automatically handles many verification rules, creating additional custom rules may inadvertently block this critical traffic.
36
+
37
+
#### Header forwarding requirements
38
+
39
+
Ensure that the `HOST` header is correctly forwarded in your Worker configuration. Failure to properly forward headers will cause verification requests to fail.
40
+
22
41
### Configure routing
23
42
24
43
In your Cloudflare dashboard, select **Edit Code** and add the following script into your Worker's code. See the [Cloudflare documentation](https://developers.cloudflare.com/workers-ai/get-started/dashboard/#development) for more information on editing a Worker.
To host your documentation at a `/docs` subpath using AWS Route 53 and Cloudfront, you need to configure your DNS provider to point to your Cloudfront distribution.
10
+
11
+
## Proxies with Vercel deployments
12
+
13
+
If you use AWS CloudFront as a proxy with Vercel deployments, you must configure CloudFront to avoid interfering with Vercel's domain verification and SSL certificate provisioning.
14
+
15
+
Improper CloudFront configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.
16
+
17
+
### Required path allowlist
18
+
19
+
CloudFront must allow traffic to these specific paths without caching or blocking:
20
+
21
+
-`/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
22
+
-`/.well-known/vercel/*` - Required for Vercel domain verification
23
+
24
+
These paths should be configured to bypass CloudFront caching and pass through directly to your origin.
25
+
26
+
### Header forwarding requirements
27
+
28
+
Ensure that CloudFront forwards the `HOST` header and client IP information correctly. This is critical for Vercel's verification processes.
29
+
30
+
When using CloudFront with Vercel deployments, CloudFront automatically adds the `CloudFront-Viewer-Address` header containing the original client's IP address.
31
+
32
+
Make sure your CloudFront distribution is configured to forward this header to your origin by including it in your origin request policy or cache policy headers configuration.
33
+
9
34
## Create Cloudfront Distribution
10
35
11
36
Navigate to [Cloudfront](https://aws.amazon.com/cloudfront) inside the AWS console and click on `Create distribution`
@@ -70,19 +95,25 @@ Behaviors in Cloudfront enables control over the subpath logic. At a high level,
70
95
-**If a user lands on /docs**, go to `[SUBDOMAIN].mintlify.dev`
71
96
-**If a user lands on any other page**, go the current landing page
72
97
73
-
We're going to create three behaviors by clicking on the `Create behavior` button.
98
+
Select the **Create behavior** button and create the following behaviors.
99
+
100
+
### `/.well-known/*`
101
+
102
+
If you are deploying to Vercel, create a behavior for Vercel verification paths with a **Path pattern** of `/.well-known/*` and **Origin and origin groups** pointing to your main origin (the staging URL).
103
+
104
+
For **Cache policy**, select `CachingDisabled` to ensure these verification requests pass through without caching.
74
105
75
106
### `/docs/*`
76
107
77
-
The first behavior should have a **Path pattern** of `/docs/*` with **Origin and origin groups** pointing to the `.mintlify.dev` URL (in our case `acme.mintlify.dev`)
108
+
Create a behavior with a **Path pattern** of `/docs/*` with **Origin and origin groups** pointing to the `.mintlify.dev` URL (in our case `acme.mintlify.dev`)
For **Cache policy**, select `CachingOptimized` and create behavior.
82
113
83
114
### `/docs`
84
115
85
-
The second behavior should be the same as the first one but with a **Path pattern** of `/docs` and **Origin and origin groups** pointing to the same `.mintlify.dev` URL.
116
+
Create a behavior with a **Path pattern** of `/docs` and **Origin and origin groups** pointing to the same `.mintlify.dev` URL.
Copy file name to clipboardExpand all lines: advanced/subpath/vercel.mdx
+45-8Lines changed: 45 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,17 @@ title: "Vercel"
3
3
description: "Host documentation at a /docs subpath using Vercel"
4
4
---
5
5
6
-
## vercel.json Configuration
6
+
## vercel.json file
7
7
8
-
To host your documentation at a custom subpath using Vercel, you need to add the
9
-
following configuration to your `vercel.json` file.
8
+
The `vercel.json` file is Vercel's configuration file that allows you to customize how your project is built and deployed. It sits in your project's root directory and controls various aspects of your deployment, including routing, redirects, headers, and build settings.
9
+
10
+
We use the `rewrites` configuration to proxy requests from your main domain to your documentation.
11
+
12
+
Rewrites allow you to map incoming requests to different destinations without changing the URL in the browser. When someone visits `yoursite.com/docs`, Vercel will internally fetch content from `your-subdomain.mintlify.dev/docs` but the user will still see `yoursite.com/docs` in their browser. This is different from redirects, which would send users to a different URL entirely.
13
+
14
+
## Configuration
15
+
16
+
To host your documentation at a custom `/docs` subpath using Vercel, add the following configuration to your `vercel.json` file:
10
17
11
18
```json
12
19
{
@@ -23,8 +30,38 @@ following configuration to your `vercel.json` file.
23
30
}
24
31
```
25
32
26
-
<Note>
27
-
For more information, you can also refer to Vercel's offical guide on
-**`source`**: The path pattern on your domain that triggers the rewrite.
34
+
-**`destination`**: Where the request should be proxied to.
35
+
-**`:match*`**: A wildcard that captures any path segments after `/docs/`.
36
+
37
+
38
+
For more information, see [Configuring projects with vercel.json: Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites) in the Vercel documentation.
39
+
40
+
## Using external proxies with Vercel
41
+
42
+
If you're using an external proxy (like Cloudflare or AWS CloudFront) in front of your Vercel deployment, you must configure it properly to avoid conflicts with Vercel's domain verification and SSL certificate provisioning.
43
+
44
+
Improper proxy configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.
45
+
46
+
See the [supported providers](https://vercel.com/guides/how-to-setup-verified-proxy#supported-providers-verified-proxy-lite) in the Vercel documentation.
47
+
48
+
### Required path allowlist
49
+
50
+
Your external proxy must allow traffic to these specific paths without blocking, redirecting, or heavily caching:
51
+
52
+
-`/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
53
+
-`/.well-known/vercel/*` - Required for Vercel domain verification
54
+
55
+
These paths should pass through directly to your Vercel deployment without modification.
56
+
57
+
### Header forwarding requirements
58
+
59
+
Ensure that your proxy correctly forwards the `HOST` header. Without proper header forwarding, verification requests will fail.
60
+
61
+
### Testing your proxy setup
62
+
63
+
To verify your proxy is correctly configured:
64
+
65
+
1. Test that `https://[yourdomain].com/.well-known/vercel/` returns a response.
66
+
2. Ensure SSL certificates are provisioning correctly in your Vercel dashboard.
67
+
3. Check that domain verification completes successfully.
description: "Trigger updates, embed AI assistant, and more"
3
4
icon: "book-open"
4
5
---
5
6
7
+
The Mintlify REST API enables you to programmatically interact with your documentation, trigger updates, and embed AI-powered chat experiences.
8
+
9
+
## Endpoints
10
+
11
+
-[Trigger Update](/api-reference/update/trigger): Trigger an update of your site when desired.
12
+
-[Get Update Status](/api-reference/update/status): Get the status of an update and other details about your docs.
13
+
-[Generate Assistant Message](/api-reference/chat/create-assistant-message): Embed the assistant, trained on your docs, into any application of your choosing.
14
+
6
15
## Authentication
7
16
8
-
You can generate an API key through [the dashboard](https://dashboard.mintlify.com/settings/organization/api-keys). The API key is associated with an entire organization and can be used across multiple deployments.
17
+
You can generate an API key through [the dashboard](https://dashboard.mintlify.com/settings/organization/api-keys). API keys are associated with an entire organization and can be used across multiple deployments.
18
+
19
+
### Admin API key
20
+
21
+
The admin API key is used for the majority of the API. It is used to trigger updates and get update status.
9
22
10
-
<Frame>
11
-
<imgalt="Screenshot of the API keys page in the Mintlify dashboard."src="/images/external-api-key.png" />
12
-
</Frame>
23
+
Admin API keys begin with the `mint_` prefix. Keep your admin API keys secret.
13
24
14
-
##Admin API key
25
+
### Assistant API key
15
26
16
-
The Admin API key is used for the majority of the API. It is used to trigger updates via the [Update endpoint](/api-reference/update/trigger).
27
+
The assistant API key is used for generating assistant chat messages through the API. Responses include citations so you can point your users to the right destinations for more information.
17
28
18
-
## Assistant API key
29
+
Assistant API keys begin with the `mint_dsc_` prefix.
19
30
20
-
The assistant API allows you to embed the AI assistant, trained on your docs and continually kept up to date, into any application of your choosing.
31
+
The assistant API **key** is a server-side token that should be kept secret.
21
32
22
-
Responses include citations so you can point your users to the right destinations for more information.
33
+
The assistant API **token** is a public token that can be referenced in your frontend code.
23
34
24
35
<Note>
25
-
The assistant API **token** is a public token that can be referenced in your frontend code. The API **key** is a server-side token that should be kept secret.
26
-
27
36
Calls using the assistant API token can incur costs: either using your AI chat credits or incurring overages.
Copy file name to clipboardExpand all lines: navigation.mdx
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,9 +435,7 @@ We currently support the following languages:
435
435
436
436
## Nesting
437
437
438
-
It's important to note that you can use any combination of anchors, tabs, and dropdowns - either one can be nested within each other interchangeably.
439
-
440
-
This way, you can create a very complex navigation structure that is easy to manage.
438
+
You can use any combination of anchors, tabs, and dropdowns. The components can be nested within each other interchangeably to create your desired navigation structure.
441
439
442
440
<CodeGroup>
443
441
@@ -512,7 +510,6 @@ This way, you can create a very complex navigation structure that is easy to man
512
510
}
513
511
```
514
512
515
-
516
513
```json Tabs with external anchors
517
514
{
518
515
"navigation": {
@@ -557,3 +554,17 @@ This way, you can create a very complex navigation structure that is easy to man
557
554
```
558
555
559
556
</CodeGroup>
557
+
558
+
---
559
+
560
+
## Breadcrumbs
561
+
562
+
Control how breadcrumbs display on individual pages to orient users in your documentation.
0 commit comments