Block URL access when specific word exists

181 Views Asked by At

I'm looking to configure annotations in ingress to block certain words
For example if I access the endpoint(same as host in ingress) using https://my-endpoint?blocked-word , URL should either be re-written to https://my-endpoint or user should get 400 response code back

To achieve this I need to monitor the URL for the blocked-word. Can I achieve the above scenarios configuring just the annotations in ingress?

EDIT: server-snippet with location cannot be used as it's added to blocklist for our nginx-controller

0

There are 0 best solutions below