feat: add NTFY_TOKEN support for Bearer auth #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ntfy-token-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add NTFY_TOKEN support for Bearer authentication
ntfy topics can be protected with access tokens (see https://docs.ntfy.sh/publish/#access-tokens).
Previously, the only way to use a protected topic was to embed credentials in the URL via basic auth
(https://user:pass@ntfy.example.com/topic), which is less secure and not supported by all ntfy deployments.
This adds an optional
NTFY_TOKENenvironment variable.When set, it is passed as an
Authorization: Bearer <token>header on every ntfyPOSTrequest, matching the recommended auth method for ntfy access tokens.Behaviour:
NTFY_TOKENunset or empty → no Authorization header sent (fully backwards compatible)NTFY_TOKENset →Authorization: Bearer <token>added to the requestUsage: