-
Notifications
You must be signed in to change notification settings - Fork 983
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
Fix --base-url improper path and protocol handling using zola serve
#2311
Conversation
I'm marking this as Ready for Review. The discussion in #2170 can be split into two separate features—the first being to properly parse the base_url so that The second feature requested in #2170 is to allow arbitrary paths while serving the content from a static /public directory (or wherever it is configured). This ventures into url_rewriting territory and, as far as I can tell, would require patching the
See additional comment. |
I worked through the mounting problem. We should be able to serve at any arbitrary endpoint, including subpaths. This should close #2170. |
Looks like the changes I made to support paths introduced a regression for the https change. I'm investigating. |
Fixed the regression here. This should work as stated on the tin. |
Can you cherry pick the commits on a rebased next branch? |
Yep, working on it. Some signatures have changed so it's a bit of an involved merge. |
@clarfonthey This PR has a lot of overlap with the work you did in January. Just wanted to give you a heads up so you can verify that it doesn't introduce any regressions to your work. It was a bit of a delicate merge. |
Thanks for the heads up @jamwil; any work I haven't merged is probably going to be redone anyway, so, I'm not worried about conflicts. |
@Keats Is there anything outstanding that we need to address? |
…getzola#2311) * Fix --base-url improper path and protocol handling. * Fix formatting.
…#2311) * Fix --base-url improper path and protocol handling. * Fix formatting.
…getzola#2311) * Fix --base-url improper path and protocol handling. * Fix formatting.
Correctly parse the protocol and path from the base url, and differentiate between the bound interface and the base URL when using
zola serve
.Closes #2170.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one: