Reference
Reference: routes
tenants[].applications[].routes
| Syntax | routes: [{...}, ...] |
| Default | [] |
| Context | tenants[].applications[] |
| Reload | applies on reload |
Routes with their own runtime: prefix (default), exact or regex paths plus method, header and query matchers; see ADR-0050.
tenants[].applications[].routes[].allow
| Syntax | allow: [<string>, ...] |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Client addresses and CIDR blocks allowed; if set, only these clients (403 else).
tenants[].applications[].routes[].basic_auth
| Syntax | basic_auth: {...} |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
HTTP basic authentication against an htpasswd file.
tenants[].applications[].routes[].basic_auth.realm
| Syntax | realm: <string> |
| Default | Restricted |
| Context | tenants[].applications[].routes[].basic_auth |
| Reload | applies on reload |
Realm shown by the browser (default Restricted).
tenants[].applications[].routes[].basic_auth.users_file
| Syntax | users_file: <string> |
| Default | required |
| Context | tenants[].applications[].routes[].basic_auth |
| Reload | applies on reload |
Absolute path of an htpasswd file (bcrypt, SHA-256/512 crypt or Apache MD5 entries).
tenants[].applications[].routes[].cors
| Syntax | cors: {...} |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Cross-origin resource sharing; preflight requests are answered by ScalWS.
tenants[].applications[].routes[].cors.allow_credentials
| Syntax | allow_credentials: true | false |
| Default | false |
| Context | tenants[].applications[].routes[].cors |
| Reload | applies on reload |
Allow credentials (cookies, authorization); not with allow_origins: ["*"].
tenants[].applications[].routes[].cors.allow_headers
| Syntax | allow_headers: [<string>, ...] |
| Default | ["DNT","Keep-Alive","User-Agent","X-Requested-With","If-Modified-Since","Cache-Control","Content-Type","Range","Authorization"] |
| Context | tenants[].applications[].routes[].cors |
| Reload | applies on reload |
Request headers allowed in preflight answers (ingress-nginx defaults).
tenants[].applications[].routes[].cors.allow_methods
| Syntax | allow_methods: [<string>, ...] |
| Default | ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] |
| Context | tenants[].applications[].routes[].cors |
| Reload | applies on reload |
Methods allowed in preflight answers (default: GET, PUT, POST, DELETE, PATCH, OPTIONS).
tenants[].applications[].routes[].cors.allow_origins
| Syntax | allow_origins: [<string>, ...] |
| Default | required |
| Context | tenants[].applications[].routes[].cors |
| Reload | applies on reload |
Allowed origins, e.g. https://app.example.com, https://*.example.com, or ["*"].
tenants[].applications[].routes[].cors.expose_headers
| Syntax | expose_headers: [<string>, ...] |
| Default | none |
| Context | tenants[].applications[].routes[].cors |
| Reload | applies on reload |
Response headers exposed to the page.
tenants[].applications[].routes[].cors.max_age
| Syntax | max_age: <duration> (e.g. 30s) |
| Default | 1728000s |
| Context | tenants[].applications[].routes[].cors |
| Reload | applies on reload |
How long a preflight answer may be cached, at most 365 days (default 20 days).
tenants[].applications[].routes[].deny
| Syntax | deny: [<string>, ...] |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Client addresses and CIDR blocks refused with 403; checked after allow.
tenants[].applications[].routes[].headers
| Syntax | headers: [{...}, ...] |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Request headers that must match (all of them).
tenants[].applications[].routes[].headers[].name
| Syntax | name: <string> |
| Default | required |
| Context | tenants[].applications[].routes[].headers[] |
| Reload | applies on reload |
Header name (case-insensitive) or query parameter name.
tenants[].applications[].routes[].headers[].regex
| Syntax | regex: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].headers[] |
| Reload | applies on reload |
Regular expression the value must match (searched anywhere unless anchored).
tenants[].applications[].routes[].headers[].value
| Syntax | value: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].headers[] |
| Reload | applies on reload |
Exact, case-sensitive value.
tenants[].applications[].routes[].https_redirect
| Syntax | https_redirect: true | false |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Answer plain-HTTP requests that select this route with a 301 to HTTPS; unset: the application’s https_redirect.
tenants[].applications[].routes[].max_body
| Syntax | max_body: <size> (e.g. 16KiB) |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Largest request body; overrides limits.max_request_body_bytes; 413 above.
tenants[].applications[].routes[].methods
| Syntax | methods: [<string>, ...] |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Request methods this route matches, e.g. [GET, POST]; empty: any.
tenants[].applications[].routes[].path
| Syntax | path: <string> |
| Default | required |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Path of the route; how it is compared depends on path_type.
tenants[].applications[].routes[].path_type
| Syntax | path_type: prefix | exact | regex |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
prefix (default, whole segments, longest first), exact or regex (anchored at the start, in configuration order).
tenants[].applications[].routes[].query
| Syntax | query: [{...}, ...] |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Query parameters that must match (all of them, decoded, first occurrence).
tenants[].applications[].routes[].query[].name
| Syntax | name: <string> |
| Default | required |
| Context | tenants[].applications[].routes[].query[] |
| Reload | applies on reload |
Header name (case-insensitive) or query parameter name.
tenants[].applications[].routes[].query[].regex
| Syntax | regex: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].query[] |
| Reload | applies on reload |
Regular expression the value must match (searched anywhere unless anchored).
tenants[].applications[].routes[].query[].value
| Syntax | value: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].query[] |
| Reload | applies on reload |
Exact, case-sensitive value.
tenants[].applications[].routes[].request_headers
| Syntax | request_headers: {...} |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Changes to the request headers (after the built-in proxy headers).
tenants[].applications[].routes[].request_headers.add
| Syntax | add: {<key>: <string>, ...} |
| Default | none |
| Context | tenants[].applications[].routes[].request_headers |
| Reload | applies on reload |
Headers added next to any present.
tenants[].applications[].routes[].request_headers.remove
| Syntax | remove: [<string>, ...] |
| Default | none |
| Context | tenants[].applications[].routes[].request_headers |
| Reload | applies on reload |
Headers removed.
tenants[].applications[].routes[].request_headers.set
| Syntax | set: {<key>: <string>, ...} |
| Default | none |
| Context | tenants[].applications[].routes[].request_headers |
| Reload | applies on reload |
Headers set to this value, replacing any present.
tenants[].applications[].routes[].request_timeout
| Syntax | request_timeout: <duration> (e.g. 30s) |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Time from the route match until the response head; 504 when exceeded.
tenants[].applications[].routes[].response_headers
| Syntax | response_headers: {...} |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Changes to every response of the route, including errors generated by ScalWS.
tenants[].applications[].routes[].response_headers.add
| Syntax | add: {<key>: <string>, ...} |
| Default | none |
| Context | tenants[].applications[].routes[].response_headers |
| Reload | applies on reload |
Headers added next to any present.
tenants[].applications[].routes[].response_headers.remove
| Syntax | remove: [<string>, ...] |
| Default | none |
| Context | tenants[].applications[].routes[].response_headers |
| Reload | applies on reload |
Headers removed.
tenants[].applications[].routes[].response_headers.set
| Syntax | set: {<key>: <string>, ...} |
| Default | none |
| Context | tenants[].applications[].routes[].response_headers |
| Reload | applies on reload |
Headers set to this value, replacing any present.
tenants[].applications[].routes[].rewrite
| Syntax | rewrite: {...} |
| Default | none |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Path and Host rewrite before the runtime.
tenants[].applications[].routes[].rewrite.host
| Syntax | host: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].rewrite |
| Reload | applies on reload |
Host sent upstream (implies preserve_host: false), host or host:port.
tenants[].applications[].routes[].rewrite.path
| Syntax | path: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].rewrite |
| Reload | applies on reload |
Full path; $1..$9 from a regex route, $0 the match, $$ a literal $; ?... in it sets the query (else the query is kept).
tenants[].applications[].routes[].rewrite.prefix
| Syntax | prefix: <string> |
| Default | none |
| Context | tenants[].applications[].routes[].rewrite |
| Reload | applies on reload |
Replaces the matched prefix (prefix routes only).
tenants[].applications[].routes[].runtime
| Syntax | runtime: {...} |
| Default | required |
| Context | tenants[].applications[].routes[] |
| Reload | applies on reload |
Runtime that handles requests under the path.