location /usercenter-service {
more_clear_headers "Access-Control-Allow-Origin";
more_clear_headers "Access-Control-Allow-Methods";
more_clear_headers "Access-Control-Allow-Headers";
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods ‘GET, POST, PUT,DELETE‘;
add_header Access-Control-Allow-Headers ‘Origin, X-Requested-With, Content-Type, Accept‘;
if ($request_method = ‘OPTIONS‘) {
return 204;
}
proxy_pass http://172.19.39.146:9055/usercenter-service;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 4;
proxy_send_timeout 1200;
proxy_read_timeout 1200;
}
相关文章
- 12-04解决跨域
- 12-04python变量作用域
- 12-04一个由跨平台产生的浮点数bug | 有你意想不到的结果
- 12-04跨时钟域处理之结绳法
- 12-04富文本编辑器--使用textarea即时更新文本域同步编辑器内容
- 12-04nginx – ServiceStack Docker架构
- 12-04Kerberos域安全
- 12-04双Hadoop集群&双Kerberos kdc认证跨域互信
- 12-04配置nginx下别名alias支持PHP fastcgi解析
- 12-04sql注入跨站点脚本编制