update nginx config

This commit is contained in:
moicen
2022-01-21 03:22:54 +08:00
parent a2ed17047a
commit 9696e18a9f
2 changed files with 5 additions and 10 deletions
+5 -7
View File
@@ -14,6 +14,7 @@ server {
set $htyuc "http://127.0.0.1:3000"; #htyuc host
set $resty_loc "/usr/local/openresty";
set $convert "/usr/bin/convert";
set $script_path "/home/alchemy/resty_functions/scripts";
location / {
try_files $uri $uri/ /index.html;
@@ -28,9 +29,6 @@ server {
root $resty_loc/nginx/html/admin;
index index.html;
if ($http_origin !~ [a-z]+\.moicen\.com$) {
return 403;
}
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'Authorization,unionid,HtySudoerToken,HtyHost,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
@@ -42,19 +40,19 @@ server {
#Upload image files
location /api/ngx/image/upload {
content_by_lua_file $resty_loc/resty_funcs/upload.lua;
content_by_lua_file $script_path/upload.lua;
}
#Combine image files
location /api/ngx/image/combine {
content_by_lua_file $resty_loc/resty_funcs/combine.lua;
content_by_lua_file $script_path/combine.lua;
}
#Audio file download
location /api/ngx/audio/upload {
content_by_lua_file $resty_loc/resty_funcs/upload_audio.lua;
content_by_lua_file $script_path/upload_audio.lua;
}
#Audio file convert
location /api/ngx/audio/convert {
content_by_lua_file $resty_loc/resty_funcs/convert_audio.lua;
content_by_lua_file $script_path/convert_audio.lua;
}
location /api/v1/ws/ {
-3
View File
@@ -29,9 +29,6 @@ server {
location /api/v1/ts/ {
if ($http_origin !~ [a-z]+\.moicen\.com$) {
return 403;
}
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'Authorization,HtyAdminToken,HtySudoerToken,HtyHost,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';