Redirect only the public HTTP ingress to canonical HTTPS
This commit is contained in:
1 parent
6314b6a6f6
commit
13b74ba8a7
1 file changed
+5
@@ -16,6 +16,10 @@ http {
|
|||||||
uwsgi_temp_path /run/framebridge-publisher/uwsgi;
|
uwsgi_temp_path /run/framebridge-publisher/uwsgi;
|
||||||
scgi_temp_path /run/framebridge-publisher/scgi;
|
scgi_temp_path /run/framebridge-publisher/scgi;
|
||||||
map $http_upgrade $connection_upgrade { default upgrade; '' close; }
|
map $http_upgrade $connection_upgrade { default upgrade; '' close; }
|
||||||
|
map "$host|$http_x_forwarded_proto" $framebridge_https_redirect {
|
||||||
|
default 0;
|
||||||
|
"framebridge.betancourt.one|http" 1;
|
||||||
|
}
|
||||||
server {
|
server {
|
||||||
listen 127.0.0.1:8088;
|
listen 127.0.0.1:8088;
|
||||||
listen @GERANAS_LAN_IP@:8088;
|
listen @GERANAS_LAN_IP@:8088;
|
||||||
@@ -23,6 +27,7 @@ http {
|
|||||||
allow @CLOUD_LAN_IP@;
|
allow @CLOUD_LAN_IP@;
|
||||||
deny all;
|
deny all;
|
||||||
server_name framebridge.betancourt.one;
|
server_name framebridge.betancourt.one;
|
||||||
|
if ($framebridge_https_redirect) { return 301 https://framebridge.betancourt.one$request_uri; }
|
||||||
root /run/framebridge-publisher/site;
|
root /run/framebridge-publisher/site;
|
||||||
index index.html;
|
index index.html;
|
||||||
autoindex off;
|
autoindex off;
|
||||||
|
|||||||
Reference in new issue
Block a user