Files
resty_functions/conf/alchemy/ts.conf
T

23 lines
968 B
Plaintext
Raw Normal View History

2022-01-19 09:36:21 +08:00
server {
2022-02-01 22:27:42 +08:00
server_name "ts.alchemy-studio.cn";
2022-01-19 19:17:03 +08:00
listen 443 ssl;
2022-01-19 09:36:21 +08:00
listen 80;
client_max_body_size 10M;
# disable in local test env
2022-02-01 22:27:42 +08:00
ssl_certificate /etc/letsencrypt/live/alchemy-studio.cn/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/alchemy-studio.cn/privkey.pem; # managed by Certbot
2022-01-19 09:36:21 +08:00
location /api/v1/ts/ {
2022-02-12 23:49:56 +08:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always;
add_header Access-Control-Allow-Headers 'Authorization,HtyAdminToken,HtySudoerToken,HtyHost,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Max-Age 86400 always;
2022-01-19 21:25:53 +08:00
if ($request_method = 'OPTIONS') {
return 200;
2022-01-19 19:17:03 +08:00
}
2022-01-19 21:25:53 +08:00
proxy_pass http://127.0.0.1:8080/api/v1/ts/;
2022-01-19 09:36:21 +08:00
}
}