- 打卡等级:暂无等级
- 打卡总天数:317
- 打卡月天数:27
- 打卡总奖励:255
- 最近打卡:2026-04-27 01:47:51
|
选择允许跨域的网站,选择设置,注意不要直接去修改Nginx配置无效$ Z3 q m6 P0 I" n+ B% U3 R
[color=var(--focus-color)] [url=] [/url]
1 x1 u+ r+ ^' c+ ^增加允许跨域访问配置。
4 g C2 n6 E- u) B, t[color=var(--focus-color)] [url=] [/url]# ?9 J$ W/ a+ P% r. @
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------7 k1 f+ L* }4 ~+ ?
add_header Access-Control-Allow-Origin *; //这里的“*”代表全部,也可以换成IP或者域名) O; t* c+ L! b& b) Q
add_header Access-Control-Allow-Headers Origin,Accept,Authorization,platformId,ut,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;- A* S, m9 F, p" j
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
* t5 z7 f* w# R7 Gadd_header Access-Control-Allow-Credentials true;
$ |0 z, n# s1 P5 g! C1 f7 P |
|