When previewing a page, we have our route set to /handlers/preview due to an /api path conflict on AWS where the site is hosted. This works fine and the previews show. However, the exit-preview path still points to /api/exit-preview. Ideally this would be settable or default to whatever the preview path is.
Hi @asummers,
Our preview paths are hardcoded when you create your project for coherency's sake, but can be modified or set to something else if you need them to be. Are you able to also set your exit-preview
path to /handlers/exit-preview
manually with it working? I'm not an AWS pro, so let me know if I'm missing something here
Yes, everything has been moved to /handlers instead of /api. How can I modify the exit-preview path to match this? Is there a config somewhere I can change in the project? Thank you for your help!
Hi Ashley,
You can do this by specifying the new exit preview path to the PrismicPreview
component through the exitPreviewURL
prop.
So in the layout file for example:
You would update this to:
<PrismicPreview
repositoryName='your-repo-name'
exitPreviewURL='/handlers/exit-preview'
>