nginx把POST转GET请求解决405问题
2017-12-12 00:07
1501 查看
405重定向,然后把POST转GET
upstream local { server 10.0.1.11:81; } server { listen 81; server_name testf.xxx.com; location / { root /data/f/ROOT/; index index.html index.htm; # 解决vue history模式,刷新404问题。 try_files $uri $uri/ /index.html; } error_page 405 =200 @405; location @405 { root /data/f/ROOT/; proxy_method GET; proxy_pass http://local/$request_uri; } location /cashloan/ { proxy_pass https://testapicashloan.xxx.com; } location /front/ { proxy_pass https://testapifront.xxx.com; } access_log /app/logs/f_access.log main; } server { listen 80; server_name testf.xxx.com; location / { rewrite ^(.*) https://$server_name$1 permanent; } }
相关文章推荐
- 解决Get和Post请求中文乱码的问题
- Struts2中解决POST请求和GET请求中的中文乱码问题
- Nginx直接post请求获取静态文件 返回405错误的终极解决方法
- SpringMVC: HTTP Status 405 - JSPs only permit GET POST or HEAD问题的解决办法。
- vue-cli的axios使用方法,get、post请求的跨域问题解决
- 解决 AngularJs $http 发送post,get请求,SpringMvc无法接受参数的问题。
- 利用过滤器解决GET和POST请求编码问题
- 如何解决POST请求中文乱码问题,GET的又如何处理呢?
- Get,Post请求中文乱码问题有效解决方法
- 完美解决Get和Post请求中文乱码的问题
- 关于Get,Post请求中文乱码问题有效解决方法
- Get、Post请求中文乱码问题有效解决方法
- Nginx静态资源POST请求返回405 Not Allowed的解决办法
- Nginx静态文件响应POST请求,提示405错误问题
- 解决问题:在使用springmvc的web.xml配置乱码拦截器之后接收的get或者post请求中文还是乱码
- Nginx静态文件响应POST请求 提示405错误的解决方法
- Get,Post请求中文乱码问题有效解决方法
- JSP中解决中文乱码问题 对于post有效 对于get请求方式无效。
- 解决Sping Mvc中post、get请求中文乱码问题
- Spring MVC 3 表单中文提交post请求和get请求乱码问题的解决方法