Skip to content

Commit

Permalink
docs: cookie_name
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Nov 15, 2021
1 parent 2b32575 commit 3dd44f1
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions docs/hub/config.md
Expand Up @@ -46,21 +46,22 @@ Note that HTTPS is automatically disabled if you set the server port to 80.

The following Mercure-specific directives are available:

| Directive | Description | Default |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
| `publisher_jwt <key> [<algorithm>]` | the JWT key and algorithm to use for publishers, can contain [placeholders](https://caddyserver.com/docs/conventions#placeholders) | |
| `subscriber_jwt <key> [<algorithm>]` | the JWT key and algorithm to use for subscribers, can contain [placeholders](https://caddyserver.com/docs/conventions#placeholders) | |
| `anonymous` | allow subscribers with no valid JWT to connect | `false` |
| `publish_origins <origins...>` | a list of origins allowed publishing, can be `*` for all (only applicable when using cookie-based auth) | |
| `cors_origins <origin...>` | a list of allowed CORS origins, ([troubleshoot CORS issues](troubleshooting.md#cors-issues)) | |
| `subscriptions` | expose the subscription web API and dispatch private updates when a subscription between the Hub and a subscriber is established or closed. The topic follows the template `/.well-known/mercure/subscriptions/{topicSelector}/{subscriberID}` | |
| `heartbeat` | interval between heartbeats (useful with some proxies, and old browsers), set to `0s` disable | `40s` |
| `transport_url <url>` | URL representation of the transport to use. Use `local://local` to disabled history, (example `bolt:///var/run/mercure.db?size=100&cleanup_frequency=0.4`), see also [the cluster mode](cluster.md) | `bolt://mercure.db` |
| `dispatch_timeout <duration>` | maximum duration of the dispatch of a single update, set to `0s` disable | `5s` |
| `write_timeout <duration>` | maximum duration before closing the connection, set to `0s` disable | `600s` |
| `ui` | enable the UI and expose demo endpoints | |
| `demo` | enable the UI but do not expose demo endpoints | |
| `cache <num-counters> <max-cost>` | cache configuration (see [Ristretto's docs](https://github.com/dgraph-io/ristretto)), set to -1 to disable the cache | `6e7` `1e8` (100MB) |
| Directive | Description | Default |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| `publisher_jwt <key> [<algorithm>]` | the JWT key and algorithm to use for publishers, can contain [placeholders](https://caddyserver.com/docs/conventions#placeholders) | |
| `subscriber_jwt <key> [<algorithm>]` | the JWT key and algorithm to use for subscribers, can contain [placeholders](https://caddyserver.com/docs/conventions#placeholders) | |
| `anonymous` | allow subscribers with no valid JWT to connect | `false` |
| `publish_origins <origins...>` | a list of origins allowed publishing, can be `*` for all (only applicable when using cookie-based auth) | |
| `cors_origins <origin...>` | a list of allowed CORS origins, ([troubleshoot CORS issues](troubleshooting.md#cors-issues)) | |
| `cookie_name <name>` | the name of the cookie to use for the authorization mechanism | `mercureAuthorization` |
| `subscriptions` | expose the subscription web API and dispatch private updates when a subscription between the Hub and a subscriber is established or closed. The topic follows the template `/.well-known/mercure/subscriptions/{topicSelector}/{subscriberID}` | |
| `heartbeat` | interval between heartbeats (useful with some proxies, and old browsers), set to `0s` disable | `40s` |
| `transport_url <url>` | URL representation of the transport to use. Use `local://local` to disabled history, (example `bolt:///var/run/mercure.db?size=100&cleanup_frequency=0.4`), see also [the cluster mode](cluster.md) | `bolt://mercure.db` |
| `dispatch_timeout <duration>` | maximum duration of the dispatch of a single update, set to `0s` disable | `5s` |
| `write_timeout <duration>` | maximum duration before closing the connection, set to `0s` disable | `600s` |
| `ui` | enable the UI and expose demo endpoints | |
| `demo` | enable the UI but do not expose demo endpoints | |
| `cache <num-counters> <max-cost>` | cache configuration (see [Ristretto's docs](https://github.com/dgraph-io/ristretto)), set to -1 to disable the cache | `6e7` `1e8` (100MB) |

See also [the list of built-in Caddyfile directives](https://caddyserver.com/docs/caddyfile/directives).

Expand Down

0 comments on commit 3dd44f1

Please sign in to comment.