we did experience issues with the loading of librarys from the web in our own adjusted JS view nodes in the browsers.
“Content Security Policy: The page’s settings observed the loading of a resource at …”
I understood from KNIME this is related to a new setting under KNIME Server Version 4.8.1:
The following new configuration options have been added:
So far I managed to switch that to the report only and not to block content anymore.
I assume I can switch it completely off via the second option, but I found no example how to. I assume false does not work here.
I assume that our NGINX is doing that CSP stuff already and the KNIME Server does not need to have that twice.
PS. Maybe you could also provide examples for the second option.
You need to construct an appropriate CSP declaration and provide it to our server configuration option. The default value is
default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' 'self'; style-src 'unsafe-inline' 'self'; img-src 'self' data:;
The new value must not be more restrictive otherwise the WebPortal will not work properly any more.
My issue is for example Content Security Policy: The page’s settings observed the loading of a resource at https://firstname.lastname@example.org/dist/leaflet.js (“script-src”).
From what I read it should then look like this in the knime file:
default-src 'self' https://email@example.com/*; script-src 'unsafe-inline' 'unsafe-eval' 'self' https://firstname.lastname@example.org/; style-src 'unsafe-inline' 'self'; img-src 'self' data:;
Is that the way it should look? I want to assure, that the defined library can be accessed and not the whole database.
it appears that you can only allow whole domains, and not individual files. Therefore the CSP should look like
default-src 'self' unpkg.com; script-src 'unsafe-inline' 'unsafe-eval' 'self' unpkg.com; style-src 'unsafe-inline' 'self'; img-src 'self' data:;
Thanks a lot.
And how do I switch it completely off?
It’s not possible to disable CSP. However, if you are running behing nginx anyway, you can simply remove the header there.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.