Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jobs/haproxy/templates/haproxy.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ frontend http-in
<%- acl_names=acl_names+acl["acl_name"]+" " -%>
<%- end -%>
<%- end -%>
http-request set-var-fmt(txn.block_reason) "blocked by custom acl(s) <%= acl_names %>" if <%= acl_names %>
http-request deny if <%= acl_names %>
<%- end -%>
<%- end -%>
Expand Down Expand Up @@ -653,6 +654,7 @@ frontend https-in
<%- acl_names=acl_names+acl["acl_name"]+" " -%>
<%- end -%>
<%- end -%>
http-request set-var-fmt(txn.block_reason) "blocked by custom acl(s) <%= acl_names %>" if <%= acl_names %>
http-request deny if <%= acl_names %>
<%- end -%>
<%- end -%>
Expand Down Expand Up @@ -833,6 +835,7 @@ frontend wss-in
<%- acl_names=acl_names+acl["acl_name"]+" " -%>
<%- end -%>
<%- end -%>
http-request set-var-fmt(txn.block_reason) "blocked by custom acl(s) <%= acl_names %>" if <%= acl_names %>
http-request deny if <%= acl_names %>
<%- end -%>
<%- end -%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
it 'adds the correct acls and http-request deny rules' do
expect(frontend_http).to include('acl block_host hdr_beg(host) -i login')
expect(frontend_http).to include('acl whitelist_ips src 5.22.5.11 5.22.5.12')

expect(frontend_http).to include('http-request set-var-fmt(txn.block_reason) "blocked by custom acl(s) block_host !whitelist_ips " if block_host !whitelist_ips')
expect(frontend_http).to include('http-request deny if block_host !whitelist_ips')
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
it 'adds the correct acls and http-request deny rules' do
expect(frontend_https).to include('acl block_host hdr_beg(host) -i login')
expect(frontend_https).to include('acl whitelist_ips src 5.22.5.11 5.22.5.12')

expect(frontend_https).to include('http-request set-var-fmt(txn.block_reason) "blocked by custom acl(s) block_host !whitelist_ips " if block_host !whitelist_ips')
expect(frontend_https).to include('http-request deny if block_host !whitelist_ips')
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
it 'adds the correct acls and http-request deny rules' do
expect(frontend_wss).to include('acl block_host hdr_beg(host) -i login')
expect(frontend_wss).to include('acl whitelist_ips src 5.22.5.11 5.22.5.12')

expect(frontend_wss).to include('http-request set-var-fmt(txn.block_reason) "blocked by custom acl(s) block_host !whitelist_ips " if block_host !whitelist_ips')
expect(frontend_wss).to include('http-request deny if block_host !whitelist_ips')
end
end
Expand Down