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

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

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742384730a4433827.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信