Nginx跨域处理
1:nginx服务端配置:
方便复制:
#add_header ‘Access-Control-Allow-Origin’ ‘$http_origin’;
#add_header ‘Access-Control-Allow-Credentials’ ‘true’;
#add_header ‘Access-Control-Allow-Methods’ ‘GET,POST,DELETE,PUT,OPTIONS’;
#add_header ‘Access-Control-Allow-Headers’ ‘DNT,web-token,x-secret-key,ap[……]