Created
November 23, 2017 16:58
-
-
Save meineerde/ca68bbf782c36a12be299a9f915bfb75 to your computer and use it in GitHub Desktop.
HAProxy: Deny a request while keeping the client-connection alive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend main | |
bind :443 ssl crt /tmp/foo.pem | |
mode http | |
option http-keep-alive | |
# ... | |
use_backend bk_deny if { path_beg /you/didnt/say/the/magic/word } | |
default_backend bk_servers | |
frontent deny | |
bind 127.0.0.1:8001 | |
mode http | |
http-request deny | |
backend bk_servers | |
# your normal servers | |
server foo 10.42.42.42:80 | |
server bar 10.23.23.23:80 | |
backend bk_deny | |
server deny 127.0.0.1:8001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment