0

Im building a React-app and currently want to redirect requests to the port 80 (via http://...) to the port 443 (respond as https://...). I handle de url change on my app constructor (checking window.location), but actually, my problem is about docker I think. On my docker-compose i have something like:

.... (image of reactapp)
ports:
  - "443:443"
  - "80:443"
....

So, my react app is just listen to port 443, some suggestions? Thanks!

  • https://stackoverflow.com/a/41770848/952310 – Yair Nevet Dec 23 '20 at 09:28
  • I currently create my app indicating in the .env file the 443 port, i have run my app correctly but, when some request arrive to the port 80, the server does not respond (doing request out of the container) – AYROverFlow Dec 23 '20 at 09:32
  • Sounds like you need to look for docker container port mapping: https://runnable.com/docker/binding-docker-ports – Yair Nevet Dec 23 '20 at 13:46

0 Answers0