Skip to content

Commit

Permalink
Merge pull request #357 from node-red/add-new-config-opts
Browse files Browse the repository at this point in the history
Add static cors and cookie options to docs
  • Loading branch information
knolleary authored Jun 20, 2024
2 parents 211fe49 + 2a177ff commit a43cff6
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/user-guide/runtime/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ httpAdminMiddleware
// Be sure to call next() if the request should be passed on
}

httpAdminCookieOptions
: when Admin Autentication is enabled, this can be used to customise the options used
when setting the session cookie used as part of the OAuth authentication flow.
The available options are documented [here](https://www.npmjs.com/package/cookie#options-1).

httpNodeRoot
: the root url for nodes that provide HTTP endpoints. If set to `false`, all node-based HTTP endpoints are disabled. Default: `/`

Expand All @@ -93,25 +98,30 @@ httpStatic

This property can also be set as an Array to support multiple static directories, each
with its own set of options. The options include the path to the local directory to serve
content from, the root url to serve them from and an optional custom middleware function.
content from, the root url to serve them from, an optional custom middleware function and an
optional CORS configuration.

For example:

httpStatic: [
{
path: '/opt/static/',
root: '/private/',
middleware: myCustomHttpMiddleware
middleware: myCustomHttpMiddleware,
cors: {

}
}
]

*Standalone only*.



httpStaticAuth
: enabled HTTP Basic Authentication on the static content. See `httpAdminAuth` for format.

httpStaticCors
: enables cross-origin resource sharing for the httpStatic endpoints as defined [here](https://github.com/troygoode/node-cors#configuration-options)

httpNodeCors
: enables cross-origin resource sharing for the nodes that provide HTTP endpoints,
as defined [here](https://github.com/troygoode/node-cors#configuration-options)
Expand Down

0 comments on commit a43cff6

Please sign in to comment.