Skip to content

Basic auth in URL not working with Caddy #15

@damomato

Description

@damomato

Thanks for your work on this, everything is working great except I can't pass basic auth through the url to skip the login page.

For example, http://user:pass@service.example.xyz just takes me to the login page without signing in.

I'm guessing its due to something I need to add to my Caddy config? I've provided my docker and caddy set up below.

Docker compose

services:
  nforwardauth:
    image: nosduco/nforwardauth:v1
    container_name: auth
    environment:
      - PUID=1026
      - PGID=1000
      - TZ=Country/City
      - TOKEN_SECRET=examplesecret
      - AUTH_HOST=auth.example.xyz
      - COOKIE_DOMAIN=example.xyz
      - PORT=3000
    volumes:
      - ./passwd/passwd.txt:/passwd:ro
    ports:
      - 3000:3000
    restart: unless-stopped 

Caddyfile

auth.example.xyz {
	reverse_proxy http://127.0.0.1:3000
}

service.example.xyz {
	forward_auth http://127.0.0.1:3000 {
		uri /
	}
	reverse_proxy http://127.0.0.1:1111
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions