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

Not all paths are rewritten to the baseUrl #1166

Open
jkaberg opened this issue Oct 3, 2023 · 6 comments · May be fixed by #1298
Open

Not all paths are rewritten to the baseUrl #1166

jkaberg opened this issue Oct 3, 2023 · 6 comments · May be fixed by #1298
Labels
api Backend API baseurl bug Something isn't working web

Comments

@jkaberg
Copy link

jkaberg commented Oct 3, 2023

Version
1.31.0

Describe the bug
Not all paths are rewritten to the baseUrl (from config) which is set to baseUrl = "/autobrr/". In my case it 404's Inter-Variable.woff2 (noticed from Chrome->Console) which leads to blank page when accessing https://subdomain.domain.tld/autobrr

To Reproduce
docker-compose autobrr traefik labels

    labels:
      - "traefik.http.routers.autobrr.rule=PathPrefix(`/autobrr`)"
      - "traefik.http.routers.autobrr.entrypoints=web"
      - "traefik.http.services.autobrr.loadbalancer.server.port=7474"
      - "traefik.http.routers.autobrr.middlewares=autobrr-stripprefix"
      - "traefik.http.middlewares.autobrr-stripprefix.stripprefix.prefixes=/autobrr"

Set baseUrl in config to "/autobrr/"

Expected behavior
Display autobrr interface

Desktop (please complete the following information):
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

@jkaberg jkaberg added the bug Something isn't working label Oct 3, 2023
@martylukyy
Copy link
Collaborator

Hi,

i couldn't reproduce your issue but found a speculative fix during debugging.
Can you test docker tag pr-1167 and report back if that fixed your issue?

@jkaberg
Copy link
Author

jkaberg commented Oct 4, 2023

@martylukyy So further testing before you're fix I found out that if append / to /autobrr (eg sub.domain.tld/autobrr/) it works with the info from OP. I notice that baseUrl in for instance Radarr and Sonarr is setup to /radarr and /sonarr respectively works just fine and doesn't need to append / to /baseurl

Might seem like an trivial thing now, but fixing this would bring it inline with other apps

I'll test you're fix and get back to you

@jkaberg
Copy link
Author

jkaberg commented Oct 4, 2023

Just tested pr-1167 and still the same issue

Changing baseUrl = "/autobrr/" to baseUrl = "/autobrr" also has no effect, just gives blank white page. This with pr-1167

@zze0s
Copy link
Collaborator

zze0s commented Oct 10, 2023

Hey. When we implemented baseUrl support we did a mistake to not do it properly and mount the api paths with the baseurl in front. This is why rewrite on proxy level is required when using baseurl.

Your Traefik setup does look correct, but I'll try it out and see.

@zze0s zze0s added web api Backend API baseurl labels Oct 10, 2023
@kaiserbh kaiserbh linked a pull request Dec 4, 2023 that will close this issue
@theQ23
Copy link

theQ23 commented May 27, 2024

i'm on version 1.42.0 and not all the url's are getting rewritten with base url
The URL for Inter-Variable.woff2 doesn't get rewritten
This results in a blank page.
image

@theQ23
Copy link

theQ23 commented May 27, 2024

In the CSS for the font-face declaration

url("Inter-Variable.woff2") format("woff2");

needs to be change to

url("./Inter-Variable.woff2") format("woff2");

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Backend API baseurl bug Something isn't working web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants