Forum Discussion
X-Forwarded-Proto on policy
I can add a specific irule, but I need to match host condition to add xfp.
Because I have one vhost with a proxyass with more 100+ host on.
- PauliusMay 03, 2023MVP
Jean_Mamène If you need a specific host header value to be matched and it's a long list you can create a data-group then in that data-group you add an entry for each host value and then perform a match in your iRule and the action to take would be to add in the XFP header similar to the following.
when HTTP_REQUEST priority 500 { if { [class match --value [HTTP::host] == CLASS-XFP-HOSTS] } { HTTP::header insert "X-Forwarded-Proto" "https" } }
The following is an example of the data-group that you can import quickly through the cli using the "load sys config from-terminal merge" command and then pasting in the data-group. You would only have to adjust the host names in the data-group to your list before pasting it into the CLI.
ltm data-group internal CLASS-XFP-HOSTS { records { www1.example.com { } www2.example.com { } www3.example.com { } } type string }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com