You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug or more a feature request (which I'm happy to write a PR for) - When using a reverse proxy with a "prefix" in the path, the app fails to load - it get's stuck on the Loading page. Looking at the console it seems like it assumes no prefix and therefore gets a 404 when trying to load /assets/index-673c0d5b.js
Expected Behavior
App should load.
To Reproduce
Steps to reproduce the behavior:
Run the app on a machine. It is then accessible at localhost:10801
Reverse proxy (I'm using caddy) a route to that port:
Try to access the app at mydomain/fishfiles (or mydomain/fishfiles/).
Gets stuck on the loading page, app is inaccessible.
Screenshots
Debugging Information
Using the stock config file.
Environment:
OS: Fedora 41
Browser: Firefox 134.0
Build Details:
Version: 0.0.9
Docker: no, single-executable. Currently running in the commandline but expect to run it inside of a Systemd unit.
Additional context
I've found #536 but I think that's a more specific case, with authentication. I've also found someone who seems to have it working with a reverse proxy already? #197 But they've got no details on that in the issue itself.
The text was updated successfully, but these errors were encountered:
Not sure if this is a bug or more a feature request (which I'm happy to write a PR for)
To be honest, I'm not 100% sure which it might be either. If you do wind up putting up a PR, it would be much appreciated!
Otherwise, I'll try to find some time over the next week or so to at least reproduce on my end. I use Caddy for reverse proxies throughout my home server setup, but always subdomains and not domain paths/prefixes.
I messed around a little this morning, I pushed a commit that is worth discussing: dc1dda9
It "fixes" the issue, but not in a way that can actually be committed to the repo, I just hard coded a few things to get it mostly working with your setup. In particular:
DOMAIN_SUB_PATH is fixed, it would have to be picked up dynamically somehow. Maybe injecting something into window
I've added a basename to the router root, same issue and likely same fix described above
The base field in the vite config was set to /web/. From what I can tell this seems to be a requirement, but is a build-time config which means it won't work for us. I tried a few guesses like ./ to try to get some kind of dynamic base supported but nothing stuck. I can't make sense of how we could leverage this, but it might be the way forward
To repro this yourself, you'll need to be able to at least build the webapp. You can use the latest server binary and set a custom client directory do your local build:
Sorry, not had chance to boot up my PC yet. Will take a stab when I do.
I've not got any vite knowledge but coming from the C# world, my instinct here is to reach for templating. Not sure if that's something already in the repo? But as you say, currently a build-time constant, so maybe not appropriate.
Description of the Bug
Not sure if this is a bug or more a feature request (which I'm happy to write a PR for) - When using a reverse proxy with a "prefix" in the path, the app fails to load - it get's stuck on the Loading page. Looking at the console it seems like it assumes no prefix and therefore gets a 404 when trying to load /assets/index-673c0d5b.js
Expected Behavior
App should load.
To Reproduce
Steps to reproduce the behavior:
mydomain/fishfiles
(ormydomain/fishfiles/
).Screenshots
Debugging Information
Using the stock config file.
Environment:
Build Details:
Additional context
I've found #536 but I think that's a more specific case, with authentication. I've also found someone who seems to have it working with a reverse proxy already? #197 But they've got no details on that in the issue itself.
The text was updated successfully, but these errors were encountered: