Jump to content

Recommended Posts

Posted

Hello forum, we're trying to use Processwire as our REST-API. We are having problems with our API login to Processwire from frontend. It gives us 403 error.

We have installed ProcessWire to subdirectory (/api/*) and our frontend is static JS files at root ( / ). Apache access logs gives 404 to our POST-request, but browser devtools shows 403 for our POST /api/login request. 

Processwire backend panel works. We also have a GET endpoint for the API that returns 200 with correct payload.  So we're wondering why does our GET works but POST doesn't?

Does this have something to do with Processwire .htaccess, or is this because of our webhost? What should we check first? Any help would be appreciated.

Posted

Hello @VeiJari I recently setup https://processwire.com/modules/rest-api/ and I couldn't get it to work easily on localhost. How are you testing it? Maybe it can save some trouble by trying to deploy it somewhere?

Posted

Hey @michelangelo Our customer wanted a shared webhost. We are not using any kind of module for the API. Because we have Processwire installed in a sub-directory we tried changing our base with .htaccess, which is recommended in the post below, but it didn't work. Is there any idea what should we check next?

 

Posted
23 hours ago, michelangelo said:

Hello @VeiJari I recently setup https://processwire.com/modules/rest-api/ and I couldn't get it to work easily on localhost. How are you testing it? Maybe it can save some trouble by trying to deploy it somewhere?

Hi had the same problem on my localhost but then I manage to solve it installing an ssl certificate to have https by default, otherwise I got 403 to every endpoint.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...