How to reject requested path without getting to webserver with HaProxy
I am using HaProxy, and I would like to reject a requested path, but not have any request go to webserver. It seems that the path options ads a http-request test, which ends up going to the server at least for a hit, even when returning an error. If I try adding a tcp-request deny rule, I get this error: "a 'tcp-request' rule placed after an 'http-request' rule will still be processed before." because the http-request rule is used to get the path. What is the best way to do this?
What do you want to be sent back to the web client?
@Derelict either no response, or 403.
So match the URL and use
http-request denyin the frontend.