Selaa lähdekoodia

Fix SSL cert generation when domain has a port included (#1136)

Cid Lopes 1 vuosi sitten
vanhempi
commit
016e1429d1
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      compose/bin/setup-ssl

+ 2 - 1
compose/bin/setup-ssl

@@ -7,7 +7,8 @@ if ! bin/docker-compose exec -T -u root app cat /root/.local/share/mkcert/rootCA
 fi
 
 # Generate the certificate for the specified domain
-bin/docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$@"
+DOMAIN_WITHOUT_PORT=$(echo "$@" | cut -d ':' -f1)
+bin/docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$DOMAIN_WITHOUT_PORT"
 echo "Moving key and cert to /etc/nginx/certs/..."
 bin/docker-compose exec -T -u root app chown app:app nginx.key nginx.crt
 bin/docker-compose exec -T -u root app mv nginx.key nginx.crt /etc/nginx/certs/