Reputation: 357
I have a rest API set up as a module in Prestashop 1.6, and I can access without problem to it and make appropriate calls in my local server (localhost:8888).
On the other hand, when I set up ngrok, I receive a new domain to have my localhost available for API calls from the outside. However, I receive 302-moved response. Do you know if the problem is on how Prestashop treats these calls according to configuration? Can you help me? Thank you.
Upvotes: 0
Views: 4769
Reputation: 552
Directly modifying it in the database didn't help to me: for some reason Prestashop does not fetch the updated values.
Having it modified through the admin console worked fine though.
It is pretty hidden, you have to go to Traffic & SEO and then scroll down until you find this 👇:
Hope that helps!
Upvotes: 2
Reputation: 357
The solution had to do with the setup of URL_DOMAIN in table ps_configuration, where PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL must be set to the ngrok's setup domain name (xxxxx.ngrok.io). And the same for table ps_shop_url, where fields domain and domain_ssl must be set to ngrok's domain name too (xxxxx.ngrok.io).
Upvotes: 3