0

I'm running a Wordpress instance (Docker) in my local Dev machine and I would like to perform HTTP requests to the Woocommerce API like in the production server (that runs on HTTPS). If I just create a key/secret pair, as the Docker image runs on HTTP, I keep receiving a 401 error indicating that I can't list resources. I've digged on it and seems to be that Basic auth is only enabled for HTTPS requests but, is there a way to make it work in a local Docker Wordpress so I can test it like in the actual production environment?

I've tried using an Nginx image as a proxy but I have the same issue and I've also tried to hack the Woocommerce authentication in the plugin source code (and I probably didn't find the right place).

2
  • authentication can be made by application password, it's managed by the core : make.wordpress.org/core/2020/11/05/… Commented Aug 25, 2024 at 4:12
  • Thanks, @mmm! That certanily helped. Using the app password and adding a custom filter (as explained in the article you link) to enable it through HTTP worked. Commented Aug 25, 2024 at 16:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.