-
Notifications
You must be signed in to change notification settings - Fork 18
Using Prismic Preview mode
Peter Jaap Blaakmeer edited this page Feb 3, 2023
·
2 revisions
Configure the Settings > Previews section in Prismic and set the preview route to /prismicio/preview
, like this:
You can add multiple preview routes, so you can add your local & staging environments as well and choose one environment when starting Preview Mode:
Add the following to your .vcl
file in sub vcl_recv {}
to use Prismic Preview with Varnish;
if (req.http.Cookie ~ "io.prismic.preview") {
return (pass);
}
This will bypass Varnish caching when the preview cookie has been set. Note; this causes Magento to skip Varnish for the remainder of the browsing session for ALL pages (not just the preview pages).