File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,12 @@ public function setup( $user ) {
181181 $ hcpp ->cg_pws ->generate_website_cert ( $ user , ["webdav- $ user. $ domain " ] );
182182 }
183183 }else {
184+
185+ // Force SSL on non-Personal Web Server edition.
186+ $ force_ssl_conf = "/home/ $ user/conf/web/webdav- $ user. $ domain/nginx.forcessl.conf " ;
187+ $ content = "return 301 https:// $ host$ request_uri; " ;
188+ file_put_contents ( $ force_ssl_conf , $ content );
189+
184190 // TODO: support for LE
185191 }
186192
@@ -200,6 +206,8 @@ public function setup( $user ) {
200206 // TODO: support for LE
201207 }
202208
209+
210+
203211 // Start the WebDAV service on the given port.
204212 $ cmd = 'runuser -l ' . $ user . ' -c " ' ;
205213 $ cmd .= "(rclone serve webdav --addr $ ip: $ port /home/ $ user/web) > /dev/null 2>&1 & " ;
You can’t perform that action at this time.
0 commit comments