Created
August 17, 2015 09:41
-
-
Save tawateer/f8808e9e206f8d0921eb to your computer and use it in GitHub Desktop.
在 Nginx 配置中把接收到 T 的请求改成 GET.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name {{ server_name }}; | |
access_log {{ access_log }} main; | |
error_log {{ error_log }}; | |
location / { | |
access_by_lua ' | |
local reqType = ngx.var.request_method | |
if reqType == "T" | |
then | |
ngx.req.set_method(ngx.HTTP_GET) | |
end | |
'; | |
proxy_set_header Host $host; | |
proxy_pass http://proxy-nodes; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment