选择允许跨域的网站,选择设置,注意不要直接去修改Nginx配置。无效
增加允许跨域访问配置。
add_header Access-Control-Allow-Origin *; 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; add_header Access-Control-Allow-Methods GET,POST,OPTIONS; add_header Access-Control-Allow-Credentials true;
保存后关闭网站重启nginx