diff --git a/docs/3.config/0.index.md b/docs/3.config/0.index.md index 929f772ab7..7c3f58cca9 100644 --- a/docs/3.config/0.index.md +++ b/docs/3.config/0.index.md @@ -64,6 +64,16 @@ openAPI: { } ``` +Theses routes are disabled by default in production. To enable them, use the `production` key. +`"runtime"` allows middleware usage, and `"prerender"` is the most efficient because the JSON response is constant. + +```js +openAPI: { + // IMPORTANT: make sure to protect OpenAPI routes if necessary! + production: "runtime", // or "prerender" +} +``` + If you like to customize the Scalar integration, you can [pass a configuration object](https://github.com/scalar/scalar) like this: ```js