admin管理员组

文章数量:1125558

I am running a local Wordpress backend (port 8888) with a VueJS frontend (port 8081) that loads data via the json REST API. This works fine. However, when I click a preview link in the backend (for example when I made changes to a page), it opens the frontend in a new tab with some preview params, for example:

http://localhost:8081/work/?preview_id=11&preview_nonce=d738b8953f&preview=true

Now, I need to use these params to get the preview data via the json REST API, so I add these params to the fetch the preview data:

http://localhost:8888/wp-json/wp/v2/pages/11?preview_id=11&preview_nonce=d738b8953f&preview=true&acf_format=standard

However, this call returns a 403 Forbidden error. It must be some authorization problem. Is there a way to get this to work without using JWT auth?

Thanks!

本文标签: