Skip to content

Commit

Permalink
Update nginx.conf
Browse files Browse the repository at this point in the history
This is to make HTTP requests from Lapis.
  • Loading branch information
TangentFoxy committed Aug 3, 2016
1 parent c277aee commit 41ffcc4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions nginx.conf
Expand Up @@ -43,6 +43,29 @@ http {
';
}

location /proxy {
internal;
rewrite_by_lua "
local req = ngx.req
for k,v in pairs(req.get_headers()) do
if k ~= 'content-length' then
req.clear_header(k)
end
end
if ngx.ctx.headers then
for k,v in pairs(ngx.ctx.headers) do
req.set_header(k, v)
end
end
";

resolver 8.8.8.8;
proxy_http_version 1.1;
proxy_pass $_url;
}

location /map.html {
root ./;
}
Expand Down

0 comments on commit 41ffcc4

Please sign in to comment.