-
Notifications
You must be signed in to change notification settings - Fork 915
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
get_url generates http url during serve, even though base_url defines https #2434
Comments
I think one way to support https would be to allow for specifying the protocol schema inside the |
It's more that we replace the base_url in serve. I think what you're proposing is fine? |
I guess this isn't so much a bug, and more like intended behavior until support for tls terminating reverse proxies / tunneling in front of zola serve is officiallly supported. Tracking for this continues at #2435 |
Bug Report
Environment
Zola version:
0.17.2
Expected Behavior
get_url() uses the base_url protocol to build urls
Current Behavior
get_url() always uses http schema to build urls
Step to reproduce
Use a template with get_url function such as
When running zola serve like
with the following base url in config.toml:
it generates html like this:
The reason I want to use serve with https is that I'm using GitHub Codespaces, which automatically creates a secure HTTPS tunnel to any ports opened by zola.
So I get the index page using https://local-1111.dev, but inside the returned HTML it references http://local-1111.dev, which causes mixed content errors and fails loading the stylesheet.
When using the same template and using
zola build
, it generates https urls properly. However, there is no watch mode for build, so using another webserver for serving is really really inconvenient.The text was updated successfully, but these errors were encountered: