Skip to content

Commit e9f8850

Browse files
SteveLTNWeiyan
andauthored
Backwards compatibility from 1.24 (#378)
* Bump version to 1.25.2 * Fix backwards compatibility for SSL config file naming --------- Co-authored-by: Weiyan <steve.wy.shao@gmail.com>
1 parent a33353b commit e9f8850

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

fs_overlay/etc/cont-init.d/00-welcome

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
echo '
44
========================================
5-
HTTPS-PORTAL v1.25.1
5+
HTTPS-PORTAL v1.25.2
66
========================================
77
'

fs_overlay/opt/certs_manager/lib/nginx.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ def self.config_http(domain)
1818
end
1919

2020
def self.config_ssl(domain)
21-
File.open("/etc/nginx/conf.d/#{domain.name}_#{domain.port}.ssl.conf", 'w') do |f|
21+
if domain.port == "443"
22+
file_path = "/etc/nginx/conf.d/#{domain.name}.ssl.conf" # Backwards compatibility
23+
else
24+
file_path = "/etc/nginx/conf.d/#{domain.name}_#{domain.port}.ssl.conf"
25+
end
26+
27+
File.open(file_path, 'w') do |f|
2228
f.write compiled_domain_config(domain, true)
2329
end
2430
end

0 commit comments

Comments
 (0)