Forum Discussion
datagroup in the content security policy
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
Hi Ravi,
HTTP::header insert "Content-Security-Policy" "media-src [class names datagroup-name] blob: *"
- Ravi44
Nimbostratus
Hi Enes,
It worked!! Thanks a lot for the simple fix.
Regards,
Ravi.
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