mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #622] Code 40101: unauthorized error #463
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#463
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @zaidi-01 on GitHub (Feb 19, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/622
I have Ntfy deployed on Docker and it had been working fine for the past few months. Recently updated to 2.0.1 and now I keep getting the following error:
{"code":40101,"http":401,"error":"unauthorized","link":"https://ntfy.sh/docs/publish/#authentication"}. I have Traefik reverse proxy with basic auth and never enabled auth on Ntfy so I'm not sure what has changed recently.@binwiederhier commented on GitHub (Feb 19, 2023):
As part of the access token work, I changed the auth code. If the client is sending any
Authorizationheader to the ntfy server, it'll consider this as an attempt to authenticate (which I think is reasonable). If you do not have auth set up in ntfy (auth-fileset), then ntfy will reject every request.Traefik should probably not be sending an
Authorizationheader to the backend, if it doesn't need it. My apologies that the update broke your workflow, but IMHO the logic makes sense.The relevant code is in
maybeAuthenticateinserver.go, see: https://github.com/binwiederhier/ntfy/blob/main/server/server.go#L1505@zaidi-01 commented on GitHub (Feb 19, 2023):
Thanks for the explanation. It was indeed the authorization header causing issues. If anyone else comes across this problem, please ensure there isn't any authorization header being passed in the request.