Forwarded HTTP Extension Insertion (RFC 7239)
Problem this snippet solves: Until June 2014, there was no standard HTTP headers to share with web server behind reverse proxy client side request properties like:
Client IP Address requested Ho...
Updated Jun 06, 2023
Version 2.0Stanislas_Piro2
Cumulonimbus
Joined January 04, 2011
Stanislas_Piro2
Apr 19, 2018Cumulonimbus
Hi René,
Thank you for the update. I will update this code with your suggestion, but including new variables :
Include source port in "For" parameter (If "For" parameter is inserted)
set INSERT_FORWARDED_FOR_PORT 1
Include source port in "By" parameter (If "By" parameter is inserted)
set INSERT_FORWARDED_BY_PORT 0
then replacing line 33 with :
lappend FFOR_HEADER_LIST "for=$CLIENT_ADDR[ expr {$INSERT_FORWARDED_FOR_PORT ? ":[TCP::remote_port]" : ""}]"
and line 78 with :
set FBY_HEADER "by=$BY_ADDR[ expr {$INSERT_FORWARDED_BY_PORT ? ":[TCP::local_port]" : ""}]"
And I will also add priority option.