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?

  • MaggiWuerze@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    5 months ago

    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