Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rumtime): disable server-timing header via options.timing #823

Merged
merged 11 commits into from
Jan 13, 2023
14 changes: 4 additions & 10 deletions docs/content/3.config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Server runtime configuration.

**Note:**: `nitro` namespace is reserved.


<!-- Features -->

## `experimental`
Expand All @@ -59,7 +58,10 @@ Storage configuration.

- Default: `false`

Enable timing information.
Enable timing information:

- Nitro startup time log
- `Server-Timing` header on HTTP responses

## `renderer`

Expand Down Expand Up @@ -171,8 +173,6 @@ An array of paths to nitro plugins. They will be executed by order on the first

A map from dynamic virtual import names to their contents or an (async) function that returns it.



<!-- Routing -->

## `baseURL`
Expand Down Expand Up @@ -242,7 +242,6 @@ Route options. It is a map from route pattern (following [unjs/radix3](https://g

When `cache` option is set, handlers matching pattern will be automatically wrapped with `defineCachedEventHandler`. See [Cache API](/guide/introduction/cache) for all available cache options. (`swr: true|number` is shortcut for `cache: { swr: true, maxAge: number }`.)


**Example:**

```js
Expand All @@ -267,8 +266,6 @@ Prerendered options. Any route specified will be fetched during the build and co

If `crawlLinks` option is set to `true`, nitro starts with `/` by default (or all routes in `routes` array) and for HTML pages extracts `<a href="">` tags and prerender them as well.



<!-- Directories -->

## `rootDir`
Expand Down Expand Up @@ -297,8 +294,6 @@ nitro's temporary working directory for generating build-related files.

Output directories for production bundle.



<!-- Advanced -->

## `dev`
Expand Down Expand Up @@ -335,7 +330,6 @@ Preview and deploy command hints are usually filled by deployment presets.

A custom error handler function for development errors.


<!-- Rollup -->

## `rollupConfig`
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ function createNitroApp(): NitroApp {
onError: errorHandler,
});

h3App.use(config.app.baseURL, timingMiddleware);
if (config.timing) {
danielroe marked this conversation as resolved.
Show resolved Hide resolved
h3App.use(config.app.baseURL, timingMiddleware);
}

const router = createRouter();

Expand Down