Skip to content

Instantly share code, notes, and snippets.

@tawateer
Created August 17, 2015 09:41
Show Gist options
  • Save tawateer/f8808e9e206f8d0921eb to your computer and use it in GitHub Desktop.
Save tawateer/f8808e9e206f8d0921eb to your computer and use it in GitHub Desktop.
在 Nginx 配置中把接收到 T 的请求改成 GET.
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