Quantcast
Channel: admin – Robert Chen
Viewing all articles
Browse latest Browse all 18

Haproxy http filtering & header manipulation

$
0
0

The haproxy http filtering is very tricky and cannot google an altogether solution.

Block index API

reqideny ^(GET\ .*)(\?index=)(.*)

reqideny ^(POST\ .*)(\?index=)(.*)

 

Replace an external domain to an internal domain

reqirep ^Host:\ (.*)com(.*) Host:\ \1internal\2

reqirep ^Host:(.*)com(.*) Host:\ \1internal \2

reqirep ^Location:\ (.*)com(.*) Location:\ \1internal \2

rspirep ^Location:\ (.*)internal(.*) Location:\ \1com\2

reqirep ^Host:(.*)com(.*) Host:\1internal \2

rspirep ^Host:(.*)internal (.*) Host:\1com\2

The post Haproxy http filtering & header manipulation appeared first on Robert Chen.


Viewing all articles
Browse latest Browse all 18

Trending Articles