我是靠谱客的博主 微笑老师,最近开发中收集的这篇文章主要介绍nginx 修改get方法为post方法,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

修改get请求为Post请求:
location /aa {
#rewrite ^/admin http://baidu.com;
#alias /var/www/html/;
proxy_pass http://rrups/www;
proxy_method POST;
proxy_set_header
X-Real-IP $remote_addr;
proxy_set_header
X-Scheme $scheme;
proxy_set_header
X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header
Host $proxy_host;
}
node1:/etc/nginx#curl -H 'name:aaa'
http://192.168.137.2:2443/aa
8011 server response uri:/www,
method:GET,
request:GET /www HTTP/1.0,
http_name:aaa,
http_host:rrups
node1:/etc/nginx#curl -H 'name:aaa'
http://192.168.137.2:2443/aa
8011 server response uri:/www,
method:POST,
request:POST /www HTTP/1.0,
http_name:aaa,
http_host:rrups node1:

 

最后

以上就是微笑老师为你收集整理的nginx 修改get方法为post方法的全部内容,希望文章能够帮你解决nginx 修改get方法为post方法所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(43)

评论列表共有 0 条评论

立即
投稿
返回
顶部