Skip to content

Instantly share code, notes, and snippets.

@Alistair1231
Last active July 25, 2025 06:12
Show Gist options
  • Select an option

  • Save Alistair1231/1e2938e85ba08c64e1679beff71bc6d4 to your computer and use it in GitHub Desktop.

Select an option

Save Alistair1231/1e2938e85ba08c64e1679beff71bc6d4 to your computer and use it in GitHub Desktop.
Nginx Proxy Manager Basic Auth for XHR/Ajax "Custom Nginx Configuration"
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header Authorization $http_authorization;
proxy_pass http://$server:$port;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment