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
Description
When running lubelogger under a "subdirectory" behind a reverse proxy the application should generate URLs below a specific base URL. I am kindly asking for a new feature allowing to configure this base url.
E.g. if the proxy serves the app at http://192.168.0.2/lubelogger/ then e.g. the following app file /lib/bootstrap/dist/css/bootstrap.min.css should be accessed under http://192.168.0.2/lubelogger/lib/bootstrap/dist/css/bootstrap.min.css. If the application can not generate the correct URL, the proxy needs to do fragile app specific rewrites. Such rewrites may collide with other applications.
Why using "subdirectory" instead of a sub URL (e.g. lubelogger.my-server.lan)?
Because my home server is only accessible locally and I would like to avoid the complexity of setting up and managing a DNS server. mDNS and the .local domain does not work reliably with all OSs and thus I use the servers IP address to connect.
The reverse proxy is used fo convenience:
to avoid needing a certificate for each hosted application
to hide port number behind easier to remember names (e.g. 192.168.0.2:8006 vs 192.168.0.2/lubelogger)
Implementation options
I am far from a web developer or a HTTP expert, but at a quick glance there is no standard way to handle this issue. Applications usually either implement some configuration option to allow specifying a base URL, or react to HTTP headers.
The former could be implemented by adding the new BASE_URL option, possibly implemented as an environment variable.
The latter might be more portable, as the parameter would be configured at the same layer where the HTTP access is configured. Thus the application would be able to respond to direct and forwarded requests with the same app config.
AFAIK these are the de-facto standard HTTP headers being used in the wild:
X-Script-Name Non-standard HTTP header, but still widely used. Could not find a definitive documentation source. This one probably originates from CGI and WSGI.
Forwarded Standard HTTP header, but does not support a standard parameter to set the base URL. E.g. prefix=<base url> could work.
Hi all, i'm having the same issue running lubelogger with traefik (on Docker). An option in the "userConfig.json" file or an environment variable to set up a custom "http_root" will be much appreciated.
Description
When running lubelogger under a "subdirectory" behind a reverse proxy the application should generate URLs below a specific base URL. I am kindly asking for a new feature allowing to configure this base url.
E.g. if the proxy serves the app at
http://192.168.0.2/lubelogger/
then e.g. the following app file/lib/bootstrap/dist/css/bootstrap.min.css
should be accessed underhttp://192.168.0.2/lubelogger/lib/bootstrap/dist/css/bootstrap.min.css
. If the application can not generate the correct URL, the proxy needs to do fragile app specific rewrites. Such rewrites may collide with other applications.Why using "subdirectory" instead of a sub URL (e.g.
lubelogger.my-server.lan
)?Because my home server is only accessible locally and I would like to avoid the complexity of setting up and managing a DNS server.
mDNS
and the.local
domain does not work reliably with all OSs and thus I use the servers IP address to connect.The reverse proxy is used fo convenience:
192.168.0.2:8006
vs192.168.0.2/lubelogger
)Implementation options
I am far from a web developer or a HTTP expert, but at a quick glance there is no standard way to handle this issue. Applications usually either implement some configuration option to allow specifying a base URL, or react to HTTP headers.
The former could be implemented by adding the new
BASE_URL
option, possibly implemented as an environment variable.The latter might be more portable, as the parameter would be configured at the same layer where the HTTP access is configured. Thus the application would be able to respond to direct and forwarded requests with the same app config.
AFAIK these are the de-facto standard HTTP headers being used in the wild:
X-Script-Name
Non-standard HTTP header, but still widely used. Could not find a definitive documentation source. This one probably originates from CGI and WSGI.prefix=<base url>
could work.Platform
Further data
Example Nginx config:
Note: I am aware of #131 but this request is for a currently unsupported specific use-case.
The text was updated successfully, but these errors were encountered: