4837 Total CVEs
26 Years
GitHub
README.md
Rendering markdown...
POC / haproxy.cfg CFG
global
    daemon
    log stdout format raw local0
    maxconn 2000

defaults
    mode http
    timeout connect 5s
    timeout client  30s
    timeout server  30s

frontend fe
    bind *:8080

    # If path "ends with" a static extension, send to static backend.
    acl is_static path_end .png .jpg .gif .css .js

    use_backend be_static if is_static
    default_backend be_app

backend be_static
    # Always return 200 OK to make the bypass obvious
    http-request return status 200 content-type "text/plain" lf-string "STATIC OK (routed by path_end)\n"

backend be_app
    # Simulate protected area: deny /admin, otherwise return 200
    http-request deny if { path_beg /admin }
    http-request return status 200 content-type "text/plain" lf-string "APP OK\n"