2019-06-13 16:47:25 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
2020-07-12 19:02:29 +02:00
|
|
|
expires epoch;
|
|
|
|
|
2019-06-13 16:47:25 +02:00
|
|
|
location / {
|
2023-01-17 10:23:19 +01:00
|
|
|
return 301 https://$host:8443$request_uri;
|
2019-06-13 16:47:25 +02:00
|
|
|
}
|
|
|
|
|
2020-03-24 15:11:08 +01:00
|
|
|
location /ca.crt {
|
|
|
|
alias /etc/ssl/certs/snapdropCA.crt;
|
|
|
|
}
|
2023-01-18 21:01:29 +01:00
|
|
|
# To allow POST on static pages
|
|
|
|
error_page 405 =200 $uri;
|
2020-03-24 15:11:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl http2;
|
|
|
|
ssl_certificate /etc/ssl/certs/snapdrop-dev.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/certs/snapdrop-dev.key;
|
|
|
|
|
2020-07-12 19:02:29 +02:00
|
|
|
expires epoch;
|
|
|
|
|
2020-03-24 15:11:08 +01:00
|
|
|
location / {
|
|
|
|
proxy_connect_timeout 300;
|
|
|
|
proxy_pass http://node:3000;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /ca.crt {
|
|
|
|
alias /etc/ssl/certs/snapdropCA.crt;
|
|
|
|
}
|
2023-01-18 21:01:29 +01:00
|
|
|
# To allow POST on static pages
|
|
|
|
error_page 405 =200 $uri;
|
2019-06-13 16:47:25 +02:00
|
|
|
}
|
|
|
|
|