File tree Expand file tree Collapse file tree 2 files changed +56
-2
lines changed
thchat-ui/src/assets/docs Expand file tree Collapse file tree 2 files changed +56
-2
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,34 @@ location ^~ /ali/remote/
211211 {
212212 proxy_pass https://aip.baidubce.com/;
213213 proxy_ssl_server_name on;
214- proxy_set_header Host dashscope.aliyuncs.com;
214+ proxy_set_header Host aip.baidubce.com;
215+ proxy_set_header X-Real-IP $remote_addr ;
216+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
217+ proxy_set_header REMOTE-HOST $remote_addr ;
218+ proxy_set_header Upgrade $http_upgrade ;
219+ proxy_http_version 1.1;
220+ # proxy_hide_header Upgrade;
221+
222+ add_header X-Cache $upstream_cache_status ;
223+ # Set Nginx Cache
224+
225+ set $static_file8WLuNoD1 0;
226+ if ( $uri ~ * " \.(gif|png|jpg|css|js|woff|woff2)$" )
227+ {
228+ set $static_file8WLuNoD1 1;
229+ expires 1m;
230+ }
231+ if ( $static_file8WLuNoD1 = 0 )
232+ {
233+ add_header Cache-Control no-cache;
234+ }
235+ }
236+
237+ location ^~ /tt/remote/
238+ {
239+ proxy_pass https://ark.cn-beijing.volces.com;
240+ proxy_ssl_server_name on;
241+ proxy_set_header Host ark.cn-beijing.volces.com;
215242 proxy_set_header X-Real-IP $remote_addr ;
216243 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
217244 proxy_set_header REMOTE-HOST $remote_addr ;
Original file line number Diff line number Diff line change @@ -129,7 +129,34 @@ location ^~ /ali/remote/
129129 {
130130 proxy_pass https://aip.baidubce.com/;
131131 proxy_ssl_server_name on;
132- proxy_set_header Host dashscope.aliyuncs.com;
132+ proxy_set_header Host aip.baidubce.com;
133+ proxy_set_header X-Real-IP $remote_addr ;
134+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
135+ proxy_set_header REMOTE-HOST $remote_addr ;
136+ proxy_set_header Upgrade $http_upgrade ;
137+ proxy_http_version 1.1;
138+ # proxy_hide_header Upgrade;
139+
140+ add_header X-Cache $upstream_cache_status ;
141+ # Set Nginx Cache
142+
143+ set $static_file8WLuNoD1 0;
144+ if ( $uri ~ * " \.(gif|png|jpg|css|js|woff|woff2)$" )
145+ {
146+ set $static_file8WLuNoD1 1;
147+ expires 1m;
148+ }
149+ if ( $static_file8WLuNoD1 = 0 )
150+ {
151+ add_header Cache-Control no-cache;
152+ }
153+ }
154+
155+ location ^~ /tt/remote/
156+ {
157+ proxy_pass https://ark.cn-beijing.volces.com;
158+ proxy_ssl_server_name on;
159+ proxy_set_header Host ark.cn-beijing.volces.com;
133160 proxy_set_header X-Real-IP $remote_addr ;
134161 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
135162 proxy_set_header REMOTE-HOST $remote_addr ;
You can’t perform that action at this time.
0 commit comments