数据资产登记bug修改
Showing
1 changed file
with
17 additions
and
0 deletions
| ... | @@ -46,6 +46,23 @@ server { | ... | @@ -46,6 +46,23 @@ server { |
| 46 | proxy_pass http://192.168.6.20:28052; | 46 | proxy_pass http://192.168.6.20:28052; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | location /circulation { | ||
| 50 | # 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问 | ||
| 51 | add_header 'Access-Control-Allow-Origin' * always; | ||
| 52 | # 设置允许的 HTTP 方法 | ||
| 53 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT'; | ||
| 54 | # 设置允许的请求头 | ||
| 55 | add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Accept, Origin, X-Requested-With'; | ||
| 56 | # 如果需要支持 cookie,可以设置以下 header | ||
| 57 | add_header 'Access-Control-Allow-Credentials' 'true'; | ||
| 58 | # 缓存设置 | ||
| 59 | add_header Cache-Control no-cache; | ||
| 60 | add_header Cache-Control private; | ||
| 61 | |||
| 62 | # 使用 rewrite 将 /api 替换为 /new-api | ||
| 63 | rewrite ^/api/(.*)$ /$1 break; | ||
| 64 | proxy_pass http://192.168.6.20:18052; | ||
| 65 | } | ||
| 49 | 66 | ||
| 50 | error_page 500 502 503 504 /50x.html; | 67 | error_page 500 502 503 504 /50x.html; |
| 51 | location = /50x.html { | 68 | location = /50x.html { | ... | ... |
-
Please register or sign in to post a comment