07-Oct-2021 04:07
Hi,
We have a functional irule with the following csp:
when HTTP_RESPONSE {
if { [HTTP::header X-AH-Environment] contains "dev" }
{
HTTP::header insert "Content-Security-Policy" "media-src https://abc.com https://xyz.com blob: *"
HTTP::header insert "X-XSS-Protection" "1; mode=block"
HTTP::header insert "X-Content-Type-Options" "nosniff"
HTTP::header insert "Strict-Transport-Security" "max-age=31536000; includeSubDomains"
}
We would like to use a data group in the media-src to add more client urls in future.
Is there a way I can define a variable to point to the data group and invoke $variable in the csp?
Thanks,
Ravi
07-Oct-2021
12:03
- last edited on
04-Jun-2023
19:17
by
JimmyPackets
Hi Ravi,
HTTP::header insert "Content-Security-Policy" "media-src [class names datagroup-name] blob: *"