feat: package Beijing test deployment with HTTPS and preflight checks
This commit is contained in:
1 parent
ae749a1fe9
commit
c7278c00a6
33 files changed
+1153
-54
No files matched your search
@@ -0,0 +1,7 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
include /etc/nginx/moyi-routes.conf;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# Unknown HTTP hosts cannot reach the application.
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
location = /nginx-health { access_log off; return 200 "ok\n"; }
|
||||
location / { return 444; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${MOYI_DOMAIN};
|
||||
location = /nginx-health { access_log off; return 200 "ok\n"; }
|
||||
location / { return 308 https://${MOYI_DOMAIN}$request_uri; }
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name ${MOYI_DOMAIN};
|
||||
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_session_cache shared:MOYI:10m;
|
||||
ssl_session_timeout 1d;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
include /etc/nginx/moyi-routes.conf;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
server_tokens off;
|
||||
client_max_body_size 20m;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header X-Frame-Options SAMEORIGIN always;
|
||||
# Do not log prompts, credentials or query strings.
|
||||
access_log off;
|
||||
location = /nginx-health { access_log off; return 200 "ok\n"; }
|
||||
location /actuator { return 404; }
|
||||
location ~ /\. { return 404; }
|
||||
location = /health {
|
||||
proxy_pass http://moyi-api:8787/health;
|
||||
}
|
||||
location /api/ {
|
||||
proxy_pass http://moyi-api:8787;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_read_timeout 120s;
|
||||
proxy_next_upstream off;
|
||||
}
|
||||
location /v1/ {
|
||||
proxy_pass http://moyi-api:8787;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_read_timeout 120s;
|
||||
proxy_send_timeout 120s;
|
||||
proxy_next_upstream off;
|
||||
}
|
||||
location / { try_files $uri $uri/ /index.html; }
|
||||
Reference in new issue
Block a user