Blogger Information
Blog 143
fans 1
comment 0
visits 439845
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
nginx设置跨域
弘德誉曦的博客
Original
1179 people have browsed it

localtion  地址。。。{

        add_header Access-Control-Allow-Origin * ;

        add_header Access-Control-Allow-Credentials true;

        add_header Access-Control-Allow-Methods 'GET,POST,OPTIONS';

        add_header Access-Control-Allow-Headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';

        add_header Content-Type "application/octet-stream";

}


如果没有生效可能是你在header中放入了其他参数

add_header Access-Control-Allow-Headers 继续在里面添加你请求的参数名就好了。



Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post