Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in Redirect help for Vouch #2

Open
rpangrazio opened this issue May 14, 2024 · 0 comments
Open

Log in Redirect help for Vouch #2

rpangrazio opened this issue May 14, 2024 · 0 comments

Comments

@rpangrazio
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant