coolify: [Bug]: Https isn't enforced
Description
Traffic from HTTP isn’t automatically redirected to HTTPS. The option in the configuration under Advanced (Force HTTPS) is checked, and yet I can still access my app through HTTP. Is there something I might be misconfiguring? The domain in the general settings starts with https://.
I am also using V3, and I didn’t have this issue
Minimal Reproduction (if possible, example repository)
I am providing an example Docker Compose with network configuration:
version: ‘3’
services:
probitapi:
image: ‘ujstor/probitapi:1.0.4’
ports:
- ‘5005:5005’
environment:
- ‘KEY=${KEY}’
- ‘ID=${ID}’
- ‘SECRET=${SECRET}’
networks:
t880g0g: null
labels:
- traefik.enable=true
- traefik.http.middlewares.gzip.compress=true
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.routers.http-0-p4c4k80.entryPoints=http
- ‘traefik.http.routers.http-0-p4c4k80.rule=Host(probit.astipan.com) && PathPrefix(/)’
- traefik.http.routers.https-0-p4c4k80.entryPoints=https
- traefik.http.routers.https-0-p4c4k80.middlewares=gzip
- ‘traefik.http.routers.https-0-p4c4k80.rule=Host(probit.astipan.com) && PathPrefix(/)’
- traefik.http.routers.https-0-p4c4k80.tls.certresolver=letsencrypt
- traefik.http.routers.https-0-p4c4k80.tls=true
- ‘caddy_0.encode=zstd gzip’
- ‘caddy_0.handle_path.0_reverse_proxy={{upstreams}}’
- ‘caddy_0.handle_path=/*’
- caddy_0.header=-Server
- ‘caddy_0.try_files={path} /index.html /index.php’
- ‘caddy_0=https://probit.astipan.com’
- caddy_ingress_network=p4c4k80
- coolify.managed=true
- coolify.version=4.0.0-beta.239
- coolify.applicationId=1
- coolify.type=application
- coolify.name=probitapi-t880g0g-222457280347
- coolify.pullRequestId=0
restart: unless-stopped
container_name: probitapi-t880g0g-222457280347
volumes: { }
networks:
t880g0g:
name: t880g0g
external: true
Exception or Error
This is not the case with just one app. I deployed four different code examples, and in every case, I experienced the same issue. Was this previously known behavior?
Thanks for the help…project is amazing
Version
v4.0.0-beta.239
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 20 (4 by maintainers)
This is a single docker container, right? For docker compose or one click deployments, there are no
Advancedtab at all:In my case I solved this issue by:
If you are using a compose based app, you need to click on the reload compose file button.
For other apps:
I can confirm this issue is happening to me too and it is actually quite critical, as basic auth doesnt seem to cover http, so even though my website is behind a basic auth, it can still be accessed through http from certain browsers such as iOS Safari, which opens you up to legal liability in some cases such as when you are not DSGVO compliant and expect your website to be hidden behind basic auth.
even with the traefik middleware label for the http-https redirect, some browsers will still be able to connect via http:// and that needs to be fixed asap
Browsers I found to be able to connect via http:// although the proper labels are set:
Here, for reference, my docker-compose