Home > Back-end >  request to https://0.0.0.0/api failed connect ECONNREFUSED 0.0.0.0:443
request to https://0.0.0.0/api failed connect ECONNREFUSED 0.0.0.0:443

Time:01-22

Background knowledge is that I'm using a docker-based project.

The backend is implemented in Symfony and I've used API Platform for the API (using docker container). I have a PWA Angular app for the frontend to use the backend APIs in a separate docker container. To create a client API Layer for the frontend I want to use enter image description here

But the API is working on the browser. I think it is some docker issue.

Here is the video of the error: https://watch.screencastify.com/v/iPdb1X3axwivcPTuOivi

NOTE: I've tried both HTTP and HTTPS for the API URL.

I can share my docker-compose.yml file if needed.

CodePudding user response:

You can use a custom wrapper for ssl certificates like https://github.com/AriFordsham/docker-cert

CodePudding user response:

Try to change inside all your code files (in dev environments) of your Angular proyect from "httpS://0.0.0.0" to "http://0.0.0.0" and comment if it works.

  •  Tags:  
  • Related