OPNsense Forum

English Forums => General Discussion => Topic started by: mihak on May 24, 2021, 08:57:24 AM

Title: Adding CSP (Content Security Policy) to a page?
Post by: mihak on May 24, 2021, 08:57:24 AM
I would like to add a CSP policy to one Volt page in the view, allowing js code on that page to reach out and grab a specific 3rd-party API on the internet. Without defining CSP in either http header or in the <meta> tag in the <head> of the page, XMLhttprequest() refuses to execute.


Any suggestions how to do that? I tried to modify the controller for that view - with no success...