-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Run app with an URL prefix #643
Comments
I m not sure to understand what you are asking, |
I am experiencing similar problems. https://go-app.dev/static-resources#setup-local-web-directory @maxence-charriere |
I would be interested to hear if either @qin-nz or @YankeeTube figured this out. I, too, am trying to run a go-app behind a reverse proxy. I got almost there by setting my handler's Resources field to app.CustomProvider(rootDir, prefix), where rootDir is the path to my web files and prefix is "mygoapp" from "http://example.com/mygoapp/...". I found adding the "mygoapp/" prefix to the go-app/h.cachedPWAResources.Set() calls in [email protected]/pkg/app/http.go allowed the application to serve app.js, app.css, and wasm_exec.js.* But app.wasm is the sticking point. No matter what I do I cannot figure out how to serve that file when the HTTP GETs come prefixed with /mygoapp. .* Obviously a kludge. I am searching for the correct solution. |
I figured this out, and I now have my application running behind a lighttpd reverse proxy.
Getting this to work is a little fragile, but once I figured it out it made sense. I can see why this might seem obvious in hindsight. I might tack a crack at adding this to the documentation if I can figure out a way to clearly describe it. |
Related: #944. |
Hi everyone,
I have an http reverse proxy (e.g. nginx) before the go-app server. It can forward a fixed prefix (e.g.
mygoapp
) and only forward this prefix to my server.That means only request with prefix
/mygoapp
can be handled.For example,
http://example.com/mygoapp
http://example.com/web/app.wasm
should behttp://example.com/mygoapp/web/app.wasm
.It's possible to run go-app in this environment ?
@maxence-charriere
I tried this (modified on example in
README.md
), and openhttp://example.com/mygoapp
, but got404 page not found
The text was updated successfully, but these errors were encountered: