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.