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
implement / document way to set canonical URL for klaus site #140
Comments
Isn't this what the X-Forwarded-For header is for? EDIT: X-Forwarded-Host. |
On Sun, Nov 01, 2015 at 01:42:44PM -0800, Jonas Haag wrote:
Jelmer |
I think you missed my edit, probably due to reading the message as an email |
On Mon, Nov 02, 2015 at 04:35:07AM -0800, Jonas Haag wrote:
X-Forwarded-Host is better, but still doesn't include the full URL, including e.g. the subpath. |
Hm. There should be some canonical way to do this with the support of the Web framework (Flask here, but this should be available in any Web framework). I don't know how exactly the solution looks like, but I'd be surprised if this wasn't a common use case that has been solved in a general way. |
On Mon, Nov 02, 2015 at 06:21:18AM -0800, Jonas Haag wrote:
jelmer |
Ok, just had a look at the source ( |
On Mon, Nov 02, 2015 at 08:00:12AM -0800, Jonas Haag wrote:
|
On Mon, Nov 02, 2015 at 08:00:12AM -0800, Jonas Haag wrote:
The alternative that does seem to be is to use werkzeug.contrib.fixers.ProxyFix, and wrap klaus in that: from werkzeug.contrib.fixers import ProxyFix |
This seems to be the correct way to do it at the time of this writing. Do you think we should add support for adding |
Cool, thanks, I made a few modifications here and there and changed it so it's bit more independent from the actual proxy software used. I consider this case closed :-) |
I'm running klaus on a separate server, to which I proxy connections. This causes klaus to include the URL with the proxied server in any URLs, but that URL is not reachable for external users.
See e.g. https://jelmer.uk/klaus/etcd/
It would be great if there was a way to set the canonical URL to use in links, or if there is already a way to do this (through the frameworks used) if this could be documented.
The text was updated successfully, but these errors were encountered: