Skip to content

Basic Authentication not working correctly on Proxy Hosts with custom locations #2246

@PlasmaSoftUK

Description

@PlasmaSoftUK

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
I have built a Proxy Host which has a dns name, a valid SSL cert from LetsEncrypt using the latest Docker image.

I have added an Access list with Basic HTTP auth to this proxy, along with some custom locations:

/ ==> http://10.0.0.2:8181/
/radarr ==> http://10.0.0.2:7878/
/sonar ==> http://10.0.0.2:8989/
/nzbget ==> http://10.0.0.2:6789/

When accessing the default '/' location via https://my-dns-name.com/ I am presented with the basic auth login screen and it works as expected, if I authenticate and login I get to the page if I hit cancel, I get nothing.

When accessing any of the custom locations via https://my-dns-name.com/sonarr or https://my-dns-name.com/radarr the page loads in the background before the Auth is passed, and the login box is present over the top. if I hit cancel I can still browse the page just like I should be able to AFTER authentication.

Hitting Cancel on Basic Authentication dialog for custom locations (except '/') skips Auth and allows access to the page.

Nginx Proxy Manager Version
v2.9.18

To Reproduce
Steps to reproduce the behavior:

  1. Create custom locations with basic auth
  2. Browse to a custom location and choose cancel when the auth dialog is presented
  3. Page will be displayed, and it should not be.

Expected behavior
Page should NOT load in the background and when hitting Cancel on the Auth dialog the page should not be loaded. I would expect a blank page or a default auth failed page.

Screenshots

Operating System
running under MacOS Monterey, and Docker version 20.10.12, build e91ed57

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions