diff options
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -156,6 +156,24 @@ themselves; in that case the request is passed on. such a form is provided with the distribution of this software, usually in `/usr/share/gnix/login.html` (module) +- **module `switch`** + - Decides between two possible routes based on a condition. + - `condition`: + - `!is_websocket_upgrade`: Checks if a websocket was requested. + - `!is_get`: Checks if this is a GET request + - `!is_post`: Checks if this is a POST request + - `!path_starts_with <prefix>`: Checks if the URI path starts with some + prefix + - `!path_is <path>`: Checks if the URI path is exactly what you specified + - `!has_header <name>`: Checks if the request includes a certain header. + - `case_true` Handler with matched requests (module) + - `case_false` Handler for all other requests (module) + +- **module `headers`** + - Appends multiple headers to the response. + - `headers`: A map of all header name-value pairs. (object string:string) + - `inner`: The handler to add the headers to. (module) + #### Credentials config format Login credentials for `cookie_auth` and `http_basic_auth` are supplied as either |