Cloudflared block URI path


I’ve successfully setup cloudflared and was trying to block a specific path via the config.yml file but it doesn’t seem to like it. I know that I can do it via WAF(which I have for the time being) but I’m wondering if I’m doing something wrong here, my curiosity won’t let me settle for WAF :joy:… This is how my config looks like:

tunnel: xxxxxxxxxxxxxxxxxxxxxx
credentials-file: /root/.cloudflared/xxxxxxxxxxxxxxxxxxxxxx.json

  - hostname:
    path: /admin
    service: http_status:503
  - hostname:
    service: https://localhost:12345
      noTLSVerify: true
  - service: http_status:404

The only bit that is not working properly is the first one where I need to block access to

Everything else works like a charm.


My only wild guess would be to re-order them. Considering that the 404 is at the end of the list, maybe every request goes through a full-list match process, so the last match wins.

if that was the case then the 2nd rule shouldn’t work either, right? The second rule works fine