BaGet icon indicating copy to clipboard operation
BaGet copied to clipboard

Frontend doesn't use PathBase

Open stefanloerwald opened this issue 4 years ago • 4 comments

Describe the bug

I have a reverse proxy (nginx) in front of baget that forwards requests to http://host/baget to the docker container. The docker container is configured with -e PathBase=/baget. In VS, download works fine, but the browser UI at http://host/baget fails to load correctly:

Static resources are not loaded correctly, but that can be fixed by forwarding requests with the referer http://host/baget to the docker container. However, links in the UI (e.g. Packages) at the top link to http://host, i.e. without the correct path. The API call that tries to fetch the list of packages also goes to http://host instead of http://host/baget.

To Reproduce

Steps to reproduce the behavior:

  1. Set up reverse proxy, e.g. with nginx
server {
        listen 80;
        location /nuget/ {
            proxy_pass http://host.docker.internal:8080/; # assuming baget is reachable on this URI
        }
}
  1. Browse http://localhost/nuget/ in a browser

stefanloerwald avatar Apr 17 '20 15:04 stefanloerwald

I have the same issue with traefik.

cispiroglu avatar Apr 27 '20 14:04 cispiroglu

I have the same problem

LaplancheMaxime avatar Apr 30 '20 11:04 LaplancheMaxime

hi @loic-sharma, BaGet scheduled to accept a basepath?

LaplancheMaxime avatar May 04 '20 10:05 LaplancheMaxime

Same problem. However, swagger works for href/src attribute of static file is relative, e.g. href="./swagger-ui.css". At the same time, pgadmin also works by setting extra http header, e.g. X-Script-Name.

xujintao avatar Apr 21 '22 23:04 xujintao