# Solved: Oauth for Guacamole. URI extensions x2 added

**URL:** https://community.traefik.io/t/solved-oauth-for-guacamole-uri-extensions-x2-added/6477
**Category:** Traefik v2
**Tags:** docker
**Created:** [June 11, 2020, 11:58am UTC](https://community.traefik.io/t/solved-oauth-for-guacamole-uri-extensions-x2-added/6477 "2020-06-11T11:58:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Plaidstallion](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@Plaidstallion](https://community.traefik.io/u/Plaidstallion)
#### Post date: [June 11, 2020, 11:58am UTC](https://community.traefik.io/t/solved-oauth-for-guacamole-uri-extensions-x2-added/6477/1 "2020-06-11T11:58:36Z")

</div>

Edit2: I had to split the addPrefix middleware from the rest of the chain and it seems to work fine now.

I commented out `- middleware-guacamole-add-guacamole-ext` from the middleware chain and made my guacamole compose label look like this:

```auto
- "traefik.http.routers.guacamole.middlewares=chain-guacamole@file,middleware-guacamole-add-guacamole-ext@file"

```

* * *

Edit: As an update, this happens with both Google Oauth and Authelia and for any address that I need to add a URI to. Pihole is another example as it needs `/admin` appended.

* * *

Hello there. I am trying to use Google Oauth with Traefik and Guacamole. Guacamole requires a URI extension of `/guacamole`. I have added this to middlewares and it works fine but when I need to authenticate through Google, the forwardAuth seems to take the address as passed to it ([http://guacamole.domain.com/guacamole](http://guacamole.domain.com/guacamole)), the authentication occurs and then Traefik runs the approved request back through the middleware adding `/guacamole` again like shown [here](https://imgur.com/a/Lkd71So).

Is this a configuration change I need to make in Traefik or the thomseddon/traefik-forward-auth container not to double up on the URI? It works fine once I am authenticated if I just retype the web address ([guacamole.domain.com](http://guacamole.domain.com)) but I would like to figure out how to solve the issue.

Here is my middleware:

```auto
middleware-guacamole-add-guacamole-ext:
  addPrefix:
    prefix: "/guacamole"

```

and to the following chain:

```auto
chain-guacamole:
      chain:
        middlewares:
          - middleware-guacamole-add-guacamole-ext
          - middleware-ratelimit
          - middleware-default-headers
          - middleware-oauth

```

My Oauth compose is [here](https://pastebin.com/ctPDzDx6) and my Traefik compose is [here](https://pastebin.com/48iJLX5p). My Guacamole compose is [here](https://pastebin.com/k6Y0FWCV)
