112 lines
3.0 KiB
Plaintext
112 lines
3.0 KiB
Plaintext
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:MozSSL:10m;
|
|
ssl_session_tickets off;
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; #安全链接可选的加密协议
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
location / {
|
|
root amass_blog;
|
|
index index.html index.htm;
|
|
add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
|
|
location /日常随笔 {
|
|
root amass_blog;
|
|
index index.html index.htm;
|
|
add_header X-Content-Type-Options "nosniff";
|
|
access_by_lua_file lua/authentication.lua;
|
|
}
|
|
|
|
location = /api/v1/search/reindex {
|
|
proxy_pass http://local;
|
|
}
|
|
|
|
location ^~ /api/v1/search/ {
|
|
proxy_pass http://meilisearch/;
|
|
}
|
|
|
|
location ^~ /api/v1/auth {
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header x-wiz-real-ip $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
proxy_pass http://wt;
|
|
}
|
|
|
|
location ~ ^/api/v1/.*$ {
|
|
proxy_pass http://local;
|
|
}
|
|
|
|
location /wt {
|
|
root amass_blog;
|
|
index index.html index.htm;
|
|
try_files /wt/index.html =404;
|
|
}
|
|
|
|
location = /wt/app.js {
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header x-wiz-real-ip $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
proxy_pass http://wt;
|
|
}
|
|
|
|
location ~ ^/lvgl/.+$ {
|
|
root amass_blog;
|
|
index index.html index.htm;
|
|
try_files /lvgl/index.html =404;
|
|
}
|
|
|
|
location /freedom {
|
|
if ($http_upgrade != "websocket") { # WebSocket协商失败时返回404
|
|
return 404;
|
|
}
|
|
proxy_redirect off;
|
|
proxy_pass http://127.0.0.1:8089;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
# Show real IP in v2ray access.log
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
location ~ /notify.*$ {
|
|
proxy_pass http://local;
|
|
}
|
|
|
|
#error_page 404 /404.html;
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
#
|
|
error_page 500 502 503 504 /404.html;
|
|
location = /404.html {
|
|
root amass_blog;
|
|
}
|
|
|
|
location /wechat {
|
|
proxy_pass http://local;
|
|
}
|
|
|
|
location /twikoo {
|
|
proxy_pass http://twikoo;
|
|
}
|
|
|
|
location /frp/ {
|
|
proxy_pass http://frp_board/;
|
|
proxy_redirect /static/ /frp/static/;
|
|
}
|