location / { proxy_hide_header Authorization; if ($http_Authorization != "Basic asdf") { return 401; } proxy_set_header Authorization "Basic asdf"; proxy_pass http://localhost:3000; }