Skip to content

Log in Redirect help for Vouch #2

@rpangrazio

Description

@rpangrazio

So I am trying to redirect to a subdirectory of a domain using the vouch auth module from an nginx proxy. This is a the part of my config yml

  login:
    settings:
      routeonlogin: "/"
      allowedcontinueurls: 
         - https://my.domain/.*
      throttleduration: 1s

My nginx vouch block is :

    location = /validate  
    {  
        internal;
        proxy_pass http://simpleauth/api/v1/auth/vouch?continue=https://my.domain$request_uri;
        proxy_pass_request_body off;
        proxy_set_header Content-Length "";
        proxy_set_header X-Original-URI $request_uri;
    }

And here is the request from the simple auth container:

time="2024-05-14T17:57:59Z" level=info msg="1.2.3.4 GET /api/v1/auth/vouch?continue=https://my.domain/status/ 401 112" cid=oB8dPtYZo3yH
time="2024-05-14T17:57:59Z" level=info msg="1.2.3.4 GET / 200 1709" cid=gHolCMv64mHu
time="2024-05-14T17:58:00Z" level=info msg="1.2.3.4 GET /api/v1/account 401 112" cid=6TZgWqL37nts
time="2024-05-14T17:58:08Z" level=info msg="Attempting login for 'user'..." cid=dnGsIQfJZ8eA
time="2024-05-14T17:58:08Z" level=info msg="Login for user 'user' accepted" cid=dnGsIQfJZ8eA
time="2024-05-14T17:58:08Z" level=info msg="1.2.3.4 POST /api/v1/auth/session 200 46" cid=dnGsIQfJZ8eA

I've changed some details to remove IP addresses, domain names, and stuff but have kept them consistent.

Every time it just gets redirected to / of my domain. I've tried all sorts of different patterns in the regex. Including explicitly writing the URL. I have put them in " I have put them in ' and I have left them without. Always redirects to root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions