Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: misc improvements #900

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/hub/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ Be sure to catch and logs these errors in your code.

If you need more requests, upgrade to a higher plan or [the On Premise version](#on-premise).

Rate limiting implements the [leaky bucket algorithm](https://en.wikipedia.org/wiki/Leaky_bucket).
Requests are tracked at millisecond granularity. A queue of 10 requests exceeding the limit is allowed (*burst*).

## TLS Certificates

TLS certificates are automatically provisionned using [Let's Encrypt](https://letsencrypt.org).
[A `CAA` DNS entry](https://letsencrypt.org/docs/caa/) is maintained for all `mercure.rocks` subdomains.

## On Premise

The [high availability hub](cluster.md) we use for the cloud service can also be hosted on your own infrastructure. When you use the [on-premise version](cluster.md#high-availability-on-premise-version), there are no limits other than the load that can be handled by your servers.
Expand Down
3 changes: 2 additions & 1 deletion docs/hub/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## 401 Unauthorized

* Double-check that the request to the hub includes an authorization cookie (the default name is `mercureAuthorization`) or an `Authorization` HTTP header
* Double-check that the request to the hub includes an authorization cookie (the default name is `mercureAuthorization`), an `Authorization` HTTP header or an `authorization` query parameter
* If the cookie isn't set, you may have to explicitly include [the request credentials](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) (`new EventSource(url, {withCredentials: true})` and `fetch(url, {credentials: 'include'})`)
* Double-check that only one `mercureAuthorization` cookie is set (sometimes, especially in development, old Mercure cookies from other environments may remain)
* Check the logs written by the hub on `stderr`, they contain the exact reason why the token has been rejected
* Be sure to set a **secret key** (and not a JWT) in `JWT_KEY` (or in `SUBSCRIBER_JWT_KEY` and `PUBLISHER_JWT_KEY`)
* If the secret key contains special characters, be sure to escape them properly, especially if you set the environment variable in a shell, or in a YAML file (Kubernetes...)
Expand Down
Loading