nginx解决vue跨域问题
2024-09-08 07:35:21
location /epayapi
{
proxy_pass http://127.0.0.1:7011;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr; add_header X-Cache $upstream_cache_status; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Access-Control-Allow-Origin "$http_origin"; add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,language,os,token,ts,version'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header Cache-Control no-cache; if ($request_method = 'OPTIONS') { return 204; }
} #PROXY-END/testepayapi
最新文章
- web Worker使js实现‘多线程’?
- 提高C#代码质量-规范
- ubuntu 14.04 下svn + apache2 配置
- PHP FastCGI RCE Vul
- J2EE 第二阶段项目之编写代码(四)
- 使用Url.Routeurl获取url值。
- MVC通俗演义系列开篇
- HDU 1501 Zipper(DP,DFS)
- Alpha 版本测试和发布说明
- BZOJ_3942_[Usaco2015 Feb]Censoring_KMP
- World is Exploding (容斥 + 统计)
- Haystack
- php获取客户端IP地址的方法
- Python使用TCPServer编写(多线程)Socket服务
- Oracle DB 使用子查询来解决查询
- hdu2870 Largest Submatrix 单调栈
- MapReduce中,new Text()引发的写入HDFS的输出文件多一列的问题
- JDBC报错记录
- Linux内核分析实验六
- 关于html5获取用户地理位置