Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions root/defaults/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ server {
listen 3000 default_server;
listen [::]:3000 default_server;
location SUBFOLDER {
#add_header Set-Cookie "lsio_socket=SOCKETKEY; Path=SUBFOLDER; HttpOnly; SameSite=Strict" always;
alias /usr/share/selkies/web/;
index index.html index.htm;
try_files $uri $uri/ =404;
Expand All @@ -24,6 +25,8 @@ server {
proxy_pass http://127.0.0.1:5173;
}
location SUBFOLDERapi {
#satisfy any;
#auth_request /lsio-socket-auth;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
Expand All @@ -40,6 +43,9 @@ server {
proxy_pass http://127.0.0.1:CWS;
}
location SUBFOLDERpelorus/ {
#satisfy any;
#auth_request /lsio-socket-auth;
#add_header Set-Cookie "lsio_socket=SOCKETKEY; Path=SUBFOLDER; HttpOnly; SameSite=Strict" always;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
Expand All @@ -54,6 +60,13 @@ server {
client_max_body_size 10M;
proxy_pass http://127.0.0.1:5100/;
}
#location = /lsio-socket-auth {
# internal;
# if ($cookie_lsio_socket = "SOCKETKEY") {
# return 204;
# }
# return 401;
#}
error_page 500 502 503 504 /50x.html;
location = SUBFOLDER50x.html {
root /usr/share/selkies/web/;
Expand All @@ -68,6 +81,7 @@ server {
ssl_certificate /config/ssl/cert.pem;
ssl_certificate_key /config/ssl/cert.key;
location SUBFOLDER {
#add_header Set-Cookie "lsio_socket=SOCKETKEY; Path=SUBFOLDER; HttpOnly; SameSite=Strict; Secure" always;
alias /usr/share/selkies/web/;
index index.html index.htm;
try_files $uri $uri/ =404;
Expand All @@ -88,6 +102,8 @@ server {
proxy_pass http://127.0.0.1:5173;
}
location SUBFOLDERapi {
#satisfy any;
#auth_request /lsio-socket-auth;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
Expand All @@ -104,6 +120,9 @@ server {
proxy_pass http://127.0.0.1:CWS;
}
location SUBFOLDERpelorus/ {
#satisfy any;
#auth_request /lsio-socket-auth;
#add_header Set-Cookie "lsio_socket=SOCKETKEY; Path=SUBFOLDER; HttpOnly; SameSite=Strict; Secure" always;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
Expand All @@ -118,6 +137,13 @@ server {
client_max_body_size 10M;
proxy_pass http://127.0.0.1:5100/;
}
#location = /lsio-socket-auth {
# internal;
# if ($cookie_lsio_socket = "SOCKETKEY") {
# return 204;
# }
# return 401;
#}
error_page 500 502 503 504 /50x.html;
location = SUBFOLDER50x.html {
root /usr/share/selkies/web/;
Expand Down
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-nginx/run
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ fi
if [ -n "${PASSWORD}" ]; then
printf '%s:%s\n' "${CUSER}" "$(openssl passwd -apr1 "${PASSWORD}")" > /etc/nginx/.htpasswd
sed -i 's/#//g' ${NGINX_CONFIG}
sed -i "s/SOCKETKEY/$(openssl rand -hex 32)/g" ${NGINX_CONFIG}
fi
if [ ! -z ${DEV_MODE+x} ] && [[ "${DEV_MODE}" != "pixelflux" ]]; then
sed -i \
Expand Down
Loading