-
Notifications
You must be signed in to change notification settings - Fork 14
Configuration
There are only 3 settings you will need to setup after installing the module, you can access them by going to Stores → Configuration → Media Lounge → Storyblok:
Whether the module is enabled or not.
Your Storyblok API Key, you can get it from your Storyblok space by going to Settings → API-Keys.
Make sure the "Access Level" is set to "preview".
Random string that we will use to authenticate that requests are coming from Storyblok, we recommend using a 20+ characters alphanumeric string.
After this is set make sure to use the same value in your Storyblok Space by going to Settings → General → Webhook secret.
In your Storyblok space make sure you set up the following settings:
The URL of your Magento 2 website, Storyblok will use this to load a preview of your store in the visual editor. You can add multiple URLs in the Preview urls setting as well.
If you have problems loading the website preview you might need to add
ALLOW-FROM storyblok.com
to yourX-Frame-Options
header. You can do this in yourenv.php
file or in your web server configuration settings. If you are using Magento's CSP module in live mode this should work out of the box.
Make sure to set the following URL as both Story published & unpublished and Datasource entry saved: http://yourmagento.url/storyblok/cache/clean
.
Under the hood Storyblok will make a
POST
request to your website and our module will use this to clear the cache for that specific Story ID, this is where the Webhook Secret setting is used so only requests coming from Storyblok are allowed to do this.