Forum Discussion
Irule error
Hi,
I am getting error on the below rule
when HTTP_RESPONSE {
if { !([ HTTP::header exists "Public-Key-Pins-Report-Only “ ])} { HTTP::header insert "Public-Key-Pins-Report-Only" "aaaaasdsdsdsdsdsdsdsadsdsdsd"; pin-sha256="sdsdsdsdsdssdsdsdsdsd="; pin-sha256="sdsdsdssadsadsadsasadsadsadsadsad"; max-age=5184000; includeSubDomains;" }
}
Please help
Thanks
- RaghavendraSY
Altostratus
Please let me know what error you are getting. You are not able to apply iRule to virtual server or after applying an iRule virtual server is not working as expected?
- bluestar007_339
Nimbostratus
Hi, When saving the rule I am getting the error
- RaghavendraSY_7
Cumulonimbus
Please let me know what error you are getting. You are not able to apply iRule to virtual server or after applying an iRule virtual server is not working as expected?
- bluestar007_339
Nimbostratus
Hi, When saving the rule I am getting the error
- Stanislas_Piro2
Cumulonimbus
You have to add backslash before each double quote inside strings. And one double quote is not an ASCII character : use " instead of “
- Lee_Sutcliffe
Nacreous
You have a number of syntax errors, I assume you want the information in one header, if so, please try this iRule
when HTTP_RESPONSE { if {!([HTTP::header exists "Public-Key-Pins-Report-Only"])} { HTTP::header insert "Public-Key-Pins-Report-Only" "aaaaasdsdsdsdsdsdsdsadsdsdsd\"; pin-sha256=\"sdsdsdsdsdssdsdsdsdsd=\"; pin-sha256=\"sdsdsdssadsadsadsasadsadsadsadsad\"; max-age=5184000; includeSubDomains;" } }
- Stanislas_Piro2
Cumulonimbus
You can use this code :
when RULE_INIT { set stattic::PKPRO "pin-sha256=\"aaaaasdsdsdsdsdsdsdsadsdsdsd\";" append stattic::PKPRO "pin-sha256=\"sdsdsdsdsdssdsdsdsdsd\";" append stattic::PKPRO "pin-sha256=\"sdsdsdssadsadsadsasadsadsadsadsad\";" append stattic::PKPRO "max-age=5184000;" append stattic::PKPRO "includeSubDomains;" } when HTTP_RESPONSE { if {!([HTTP::header exists "Public-Key-Pins-Report-Only"])} { HTTP::header insert "Public-Key-Pins-Report-Only" $stattic::PKPRO } }
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