title: Authorization header in Nginx for proxying to basic auth backend does't work
body: <p><a href="https://joshuarogers.net/passing-static-credentials-upstream-through-nginx" rel="noreferrer">https://joshuarogers.net/passing-static-credentials-upstream-through-nginx</a>
  <a href="http://shairosenfeld.blogspot.jp/2011/03/authorization-header-in-nginx-for.html" rel="noreferrer">http://shairosenfeld.blogspot.jp/2011/03/authorization-header-in-nginx-for.html</a></p>
  
  <p>I Googled around and found these two tutorials about using Nginx for proxying to basic auth. I configured Nginx server in my local host, and restarted . But it seems doesn't work. I could access the host(<a href="http://10.211.55.12:5601" rel="noreferrer">http://10.211.55.12:5601</a> and <a href="http://10.211.55.12:80" rel="noreferrer">http://10.211.55.12:80</a> redirected to the same page in previous) without auth.</p>
  
  <p>The service in "<a href="http://10.211.55.12:5601" rel="noreferrer">http://10.211.55.12:5601</a>" is Kibana, I want to securite it with auth.</p>
  
  <pre><code>  # Default server configuration
    #
    server {
        listen 80 default_server;
        listen [::]:80 default_server;
        server_name _;
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://10.211.55.12:5601;
            proxy_set_header Authorization "Basic a2luZzppc25ha2Vk";
         }
    }
  </code></pre>