-
Existing system:
Hello everyone, I created the example plugin "pinger" for the Cockpit user interface according to the following instructions: Now I wanted to extend the plugin with an iframe. Here, for example, the "Portainer" page should be displayed Illustration of the problem: This comment is about the same source, isn't the source for my application localhost? I also get a CSP message in the developer mode of the browser: I didn't change anything in the network settings, just installed local Cockpit and Portainer Thank you 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can change the CSP policy of your plugin in's You likely want to set |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your help, I will try it out today at noon. Unfortunately, I'm a bit of a stranger to frontend and backend web development. If I still have a question, I will be happy to contact you again. |
Beta Was this translation helpful? Give feedback.
-
It worked! many thanks and best regards... |
Beta Was this translation helpful? Give feedback.
You can change the CSP policy of your plugin in's
manifest.json
, see for example https://github.com/cockpit-project/cockpit/blob/main/pkg/playground/manifest.json#L47You likely want to set
frame-src
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-src