diff --git a/docker/tiller/templates/askdarcel-web.conf.erb b/docker/tiller/templates/askdarcel-web.conf.erb index 975070384..011a00e03 100644 --- a/docker/tiller/templates/askdarcel-web.conf.erb +++ b/docker/tiller/templates/askdarcel-web.conf.erb @@ -23,25 +23,6 @@ server { proxy_redirect off; } - location ~ ^/api/v2/(.*)$ { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - - # See https://forum.nginx.org/read.php?2,215830,215832#msg-215832 - # nginx only resolves DNS for statically-configured domain names - # once on startup. Since the API is behind an ELB whose IPs may - # change, we must configure nginx to resolve DNS dynamically. - # To do this, we configure a DNS resolver here and use a variable - # rather than a literal URL when configuring the proxy below. - resolver <%= open('/etc/resolv.conf').read.match(/nameserver (.*)/)[1] rescue '8.8.8.8' %>; - resolver_timeout 5s; - - set api_url <%= env_api_go_url.chomp '/' %>; - proxy_pass $api_url/api/$1$is_args$args; - proxy_redirect off; - } - location ~ ^/api/(.*)$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;