Skip to content

Commit

Permalink
Fix config expression in cds-server.md (#1233)
Browse files Browse the repository at this point in the history
Instructions are missing `env` property from the chain and thus have no
effect. This patch fixes the documentation from this part.
  • Loading branch information
mika-espoo committed Sep 10, 2024
1 parent d060d14 commit a0ccfa9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node.js/cds-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ The behavior of the built-in `server.js` can be customized through the options d

### CORS Middleware

The built-in CORS middleware can be enabled explicitly with `cds.server.cors = true`. By default, this is `false` if in production.
The built-in CORS middleware can be enabled explicitly with `cds.env.server.cors = true`. By default, this is `false` if in production.

[Learn more about best practices regarding **Cross-Origin Resource Sharing (CORS)**.](../node.js/best-practices.md#cross-origin-resource-sharing-cors) {.learn-more}



### Toggle Generic Index Page

The default generic _index.html_ page is not served if `NODE_ENV` is set to `production`. Set `cds.server.index = true` to restore the generic index page in production.
The default generic _index.html_ page is not served if `NODE_ENV` is set to `production`. Set `cds.env.server.index = true` to restore the generic index page in production.

[See the **Generic *index.html*** page in action.](../get-started/in-a-nutshell.md#generic-index-html) {.learn-more}

Expand Down Expand Up @@ -281,4 +281,4 @@ This is useful when the expected request body sizes might vary for services with

## See Also...

The [`cds-plugin` package technique](cds-plugins) provides more options to customize server startup.
The [`cds-plugin` package technique](cds-plugins) provides more options to customize server startup.

0 comments on commit a0ccfa9

Please sign in to comment.