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
First of all, thank you for the awesome productivity hack with @genietools.
I just wanted to point out one unexpected behavior around setting a BASEPATH.
(BASEPATH can be used if you want your URLs to be "127.0.0.1:8000/my/base/path/something" instead of "127.0.0.1:8000/something" for your asset paths. Useful when you use nginx proxy)
Expected behavior: As a user, I would like to set BASEPATH either with ENV["BASEPATH"]="/my/base/path" or with `Genie.Configuration.config!(;base_path="/my/base/path")
Current behavior: Only setting via environment variable BASEPATH works (eg, ENV["BASEPATH"] or passing it when starting Julia BASEPATH="/my/base/path/" julia)
Reason: The following [line] reads BASEPATH directly from ENV without considering the config
Side note: If you want to change your BASEPATH, remember that adjust your routes accordingly (eg, route("/my/base/path/routeA") do .... end) or setup your nginx to remove the extra basepath segment from the forwarded requests!
I think there are more options that are not processed currently, e.g. PORT, WSPORT, WSBASEPATH. MAybe we can look over this and cover them all in one PR?
First of all, thank you for the awesome productivity hack with
@genietools
.I just wanted to point out one unexpected behavior around setting a BASEPATH.
(BASEPATH can be used if you want your URLs to be "127.0.0.1:8000/my/base/path/something" instead of "127.0.0.1:8000/something" for your asset paths. Useful when you use nginx proxy)
Expected behavior: As a user, I would like to set BASEPATH either with ENV["BASEPATH"]="/my/base/path" or with `Genie.Configuration.config!(;base_path="/my/base/path")
Current behavior: Only setting via environment variable BASEPATH works (eg,
ENV["BASEPATH"]
or passing it when starting JuliaBASEPATH="/my/base/path/" julia
)Reason: The following [line] reads BASEPATH directly from
ENV
without considering theconfig
Side note: If you want to change your BASEPATH, remember that adjust your routes accordingly (eg,
route("/my/base/path/routeA") do .... end
) or setup your nginx to remove the extra basepath segment from the forwarded requests!Discovered in GenieFramework/Stipple.jl#199
Happy to open the PR if there is interest (adding the check for
Genie.config.base_path
)The text was updated successfully, but these errors were encountered: