HTTP 403 Forbidden (OpenResty) on WordPress REST API POST requests

Website URL

https://foliora.online

Error Message

openresty

Other Information

The WordPress REST API index works correctly and shows the namespace foliora-license/v1.

The following routes are registered:

  • /owner-check (POST)
  • /activate (POST)
  • /deactivate (POST)
  • /check (POST)

The problem occurs when the plugin sends a POST request to the /activate endpoint. The server responds with an HTML 403 Forbidden page generated by OpenResty instead of a WordPress REST API response.

The same plugin works up to the point of contacting the license server, but activation fails.

Please check whether POST requests to this endpoint are being blocked by server-side security rules.

Welcome to the InfinityFree community forum! Good to have you here.

  • Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
  • Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
  • AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
  • Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

This sounds like the browser security system that runs on all free hosting accounts. It blocks inbound requests from anything that isn’t a web browser, and REST API endpoints are on the list of things it affects. Your plugin’s POST to /activate comes from a script, not a browser, so it can’t run the JavaScript and cookie check. It would never reach WordPress, and that fits a plain HTML 403 where you expected a REST API response.

This is the knowledge base article on the problem:

The check covers every URL, can’t be turned off for one path, and is mandatory on free hosting. The options it gives are premium hosting, or not relying on inbound API calls to your site. Outbound requests from your site to other servers work normally. Calls from JavaScript on the same domain work too.

To check that this is what you’re hitting, look at the body of the 403 response. Does it contain aes.js or the text “This site requires Javascript to work”? Also, where does the plugin send the request from: another website, a server script, or JavaScript running on foliora.online itself?