Skip to content

oidc_protected_paths and site prefix #1203

Closed

Description

@lovasoa

Hello. I'm using version 0.42.0 behind reverse proxy with oidc and site prefix.
The oidc part works (using keycloak) but oidc_protected_paths and oidc_public_paths do not use site_prefix! I have to provide absolute paths.
Is it on purpose?
By the way it is an awesome tool :-)

Originally posted by @billy34 in #1179 (comment)

Ideally the user would specify oidc_protected_paths and oidc_public_paths without the site prefix in the configuration, and we would still protect the path with the prefix.

Activity

  1. changed the title [-]Hello. I'm using version 0.42.0 behind reverse proxy with oidc and site prefix.[/-] [+]oidc_protected_paths and site prefix[/+] on Jan 27, 2026
  2. billy34 commented on Jan 27, 2026

    @billy34
    Contributor

    If that helps add these lines in src/webserver/oidc.rs near line 103
    Sorry not tested it and best bet using AI.
    Must add tests for edge case (ie when unset or empty, do not add site_prefix)

    for path in &mut protected_paths {
        *path = format!("{}{}", site_prefix_trimmed, path);
    }
    
    for path in &mut public_paths{
        *path = format!("{}{}", site_prefix_trimmed, path);
    }
  3. lovasoa commented on Jan 27, 2026

    @lovasoa
    CollaboratorAuthor

    @billy34 can you open a pull request ? I'll comment there directly !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions