Add redirect to https feature.
This commit is contained in:
1 parent
951aef1b72
commit
c18df6dd78
7 files changed
+50
-11
No files matched your search
@@ -131,6 +131,11 @@ namespace :create_site do
|
||||
site_cert.save
|
||||
site_construct.update(:site_cert=>site_cert)
|
||||
end
|
||||
if nginx_file_content.match(/\s*return\s+30[12]\s+https:\/\/\$host\$request_uri\s*;/)
|
||||
site_construct.update(:redirect_to_https => true)
|
||||
else
|
||||
site_construct.update(:redirect_to_https => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user