最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

url rewriting - 404 Rest Route not found - when serving behind "proxy"

programmeradmin0浏览0评论

To avoid CORS and speed up my static site, I have made a "proxy" from my static site.

Basically, I can make a request to: staticsite/wp-json/some-endpoint and it fetch and return the response from mywordpresssite/wp-json/some-endpoint (pretty cool if you ask me). It works fine for almost all my endpoints, however, I have just discovered that it doesn't work with this package:

When I go to: staticsite/wp-json/swp_api/search?s=query it correctly returns the data from mywordpresssite/wp-json/swp_api/search?s=query,however it returns "No route was found matching the URL and request method".

I am not sure what I am doing wrong, or what I could do to avoid this issue. It seems specific to this plugin somehow, since all the other endpoints work fine.

If I visit the endpoint directly from mywordpressiste it works fine.

发布评论

评论列表(0)

  1. 暂无评论