-
Notifications
You must be signed in to change notification settings - Fork 991
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
No option to disable port appending when developing site on environment with a reverse proxy #2002
Comments
If the option is only ever used for the negation, it makes more sense to have |
That’s true, but setting the parameter should be possible also through configuration. |
It's not the case in zola. An option only for use in |
I agree with you, it’s not the case with Zola. it’s has much more sense to use no-port-appending than appendPort with default true. |
Interesting discussion. So we can tell the best option is to use |
Yes, I think we have reached a consensus --no-port-append. Now It depends if it's ok with you and other contributors. |
Sounds good to me. I will make propper changes on my PR |
Bug Report
When using cloud development environment like gitpod.io, it allows exposing your ports via public links, behind the scene it uses a reverse proxy, that translate e.g. localhost:1234 into 1234-devenv.gitpod.io. That causes a problem because zola generated URLs that have port appended to it
1234-devenv.gitpod.io:1234/...
, that of course makes the address invalid in that scenario. The resolution would be an ability to disable that behave with a flag on a serve command--appendPort=false
. Hugo also support that option gohugoio/.../server.goEnvironment
Zola version: 0.16.1
Expected Behavior
Do not append port to urls when requested.
Expected script to run on gitpod
zola serve -p 1313 -i 0.0.0.0 -u $(gp url 1313) --appendPort false
Current Behavior
Appending ports behind gitpod reverse proxy makes URL invalid.
Step to reproduce
Open new workspace on gitpod.io (it's free), install zola with brew, init new zola project,
zola serve -p 1313 -i 0.0.0.0 -u $(gp url 1313) --appendPort false
The text was updated successfully, but these errors were encountered: