There is a new menu entry called Security (Setup » Shop » Client » Security). This is where you will find the Content Security Policy as well as the Lock shop and Service worker settings. In the Content Security Policy, in addition to the iFrame domains (frame-ancestors), you now define for each directive which hosts your plentyShop LTS may load content from. Previously, you could only maintain the frame ancestors here.
The Content Security Policy defines which sources your shop may load content from, such as scripts, images or fonts. The browser does not load sources that have not been entered. If you use external services such as Google Tag Manager or eTracker, enter their hosts in the relevant directive. The settings apply per shop.
There is a separate section for each directive, in which you enter the permitted hosts. You maintain the iFrame domains here as before.
| Section | Directive | What it controls |
|---|---|---|
| Default | default-src | Fallback for every resource type that has no directive of its own. |
| Scripts | script-src | Hosts that may provide JavaScript, e.g. Google Tag Manager or eTracker. |
| Styles | style-src | Hosts that may provide stylesheets. |
| Images | img-src | Hosts that may provide images, e.g. tracking pixels. |
| Fonts | font-src | Hosts that may provide web fonts. |
| Connections | connect-src | Hosts that the shop may contact via fetch, XHR or WebSockets, e.g. tracking and payment APIs. |
| Frames | frame-src | Hosts that may be embedded in the shop in an iFrame, e.g. YouTube. |
| Audio and video | media-src | Hosts that may provide audio and video files. |
| Objects and plugins | object-src | Hosts that may provide plugins and embedded objects. |
| Base URL | base-uri | URLs that may be used as the base URL of a page. |
A default value is stored for each directive. We are currently checking ourselves which hosts are blocked in the directives and have already entered them for you according to defined criteria. Still, review the entries. We cannot capture every individual directive of your shop in every case.
As part of this change, we have moved three existing settings into the new Security section:
| Setting | Previous path | New path |
|---|---|---|
| Lock shop | Setup » Shop » Client » Lock shop | Setup » Shop » Client » Security » Lock shop |
| Service worker | Setup » Shop » Client » SEO » Service worker | Setup » Shop » Client » Security » Service worker |
| Content Security Policy (formerly iFrame policy) | Setup » Shop » Client » SEO » iFrame policy | Setup » Shop » Client » Security » Content Security Policy |
The previous paths automatically redirect to the new paths, so existing bookmarks continue to work.
We are already rolling out the feature to plentyShop LTS step by step. The directive sections are visible once the function has been activated for your shop.
The change currently applies to plentyShop LTS. For PlentyONE Shop, it will take effect in a future version. Details appear in the PlentyONE Shop changelog.