Cloudflared block URI path

Hello,

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

ingress:
  - hostname: subdomain.whoknows.com
    path: /admin
    service: http_status:503
  - hostname: subdomain.whoknows.com
    service: https://localhost:12345
    originRequest:
      noTLSVerify: true
      originServerName: subdomain-internal.whoknows.com
  - service: http_status:404

The only bit that is not working properly is the first one where I need to block access to subdomain.whoknows.com/admin

Everything else works like a charm.

Cheers,
Alex

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