feat: add NTFY_TOKEN support for Bearer auth #1

Merged
patillacode merged 1 commit from feat/ntfy-token-auth into develop 2026-04-09 13:29:14 +02:00
Owner

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_TOKEN environment variable.
When set, it is passed as an Authorization: Bearer <token> header on every ntfy POST request, matching the recommended auth method for ntfy access tokens.

Behaviour:

  • NTFY_TOKEN unset or empty → no Authorization header sent (fully backwards compatible)
  • NTFY_TOKEN set → Authorization: Bearer <token> added to the request

Usage:

NTFY_URL=https://ntfy.example.com/my-protected-topic
NTFY_TOKEN=tk_your_access_token_here
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_TOKEN` environment variable. When set, it is passed as an `Authorization: Bearer <token>` header on every ntfy `POST` request, matching the recommended auth method for ntfy access tokens. Behaviour: - `NTFY_TOKEN` unset or empty → no Authorization header sent (fully backwards compatible) - `NTFY_TOKEN` set → `Authorization: Bearer <token>` added to the request Usage: ``` NTFY_URL=https://ntfy.example.com/my-protected-topic NTFY_TOKEN=tk_your_access_token_here ```
patillacode deleted branch feat/ntfy-token-auth 2026-04-09 13:29:27 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
patillacode/yt-shorts-proxy!1
No description provided.