Closed cryptobench closed 1 year ago
FIXED! Finally!
If anyone is running this behind traefik, the way this was solved was by adding the following labels to the service
labels:
- traefik.enable=true
- traefik.http.routers.autossl.rule=HostRegexp(`{host:.+}`)
- traefik.http.routers.autossl.entrypoints=web
- traefik.http.routers.autossl.service=svc_foo@docker
- traefik.http.services.svc_foo.loadbalancer.server.port=80
- traefik.http.routers.autossl.priority=50
- traefik.docker.network=deploy
- traefik.http.routers.auto.rule=HostRegexp(`{host:.+}`)
- traefik.http.routers.auto.service=svc_bar@docker
- traefik.http.routers.auto.tls=true
- traefik.http.routers.auto.entrypoints=web-secure
- traefik.http.services.svc_bar.loadbalancer.server.port=443
- traefik.http.services.svc_bar.loadbalancer.server.scheme=https
And to the traefik service itself
- --serversTransport.insecureSkipVerify=true
When sending a request to the container, it redirects me from HTTP to HTTPS and then this error comes up
400 The plain HTTP request was sent to HTTPS port
It happens on every single request and i'm not able to get further.
Here's a screenshot that shows 3 tries with HTTPS and one try with HTTP which resulted in 301 and then HTTP 400 afterwards.
Nginx.conf
Sample config inside conf.d
Any clue as to why this might happen?