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