mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Previous to this change, each TLS domain would be written to nginx.conf using the nginx.ssl.conf template (lines 69-73) but with an empty "server_name" directive (because NOSSL_SERVER_NAME was not set). This would then become irrelevant because nginx.conf would get truncated on line 88, and a single parsing of the template would then be written to nginx.conf on line 89, meaning only the last TLS domain would be set up to actually use TLS. This patch changes this behaviour so that all TLS domains get added to nginx.conf using the nginx.ssl.conf template (which includes redirecting HTTP -> HTTPS), and all non-TLS domains get added using the nginx.conf template, so do not get redirected to a TLS domain. Signed-off-by: Lewis Marshall <lewis@lmars.net>