Hello, recently I have moved from nginx to traefik and have found an “issue” that I would like to have fixed.
Originally with the nginx config I had a block that allowed for ntfy to work with curl without having to specify https://
but with traefik this doesn’t work and throws out Permanent Redirect
when trying to send a notification using curl.
This are currently my traefik settings for ntfy using labels:
...
labels:
- traefik.http.routers.ntfy.rule=Host(`ntfy.cronyakatsuki.xyz`)
- traefik.http.routers.ntfy.tls=true
- traefik.http.routers.ntfy.entrypoints=websecure
- traefik.http.routers.ntfy.tls.certresolver=lets-encrypt
- traefik.port=80
...
Is there any way to setup traefik and ntfy to be able to send notification without having to specific the protocol or is there no way?
So curl is trying to reach ntfy via http? Have you tried redirecting http traffic to https and also adding an endpoint for it?
- "traefik.http.middlewares.ntfy-https-redirect.redirectscheme.scheme=https" - "traefik.http.routers.ntfy.middlewares=ntfy-https-redirect"
Also, i’m not sure which version of traefik you are using, but traefik.port is no longer used. Try:
- traefik.http.services.ntfy.loadbalancer.server.port=80
New Lemmy Post: Traefik + ntfy redirect curl (https://lemmy.world/post/10901407)
Tagging: #SelfHosted(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)
I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md