-
-
Notifications
You must be signed in to change notification settings - Fork 221
Added configurable webserver URI Prefix to #640
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
Conversation
Added the webserver config property uri_prefix which allows for setting an API route prefix. This is commonly used when tegola is run behind a reverse proxy (i.e. example.com/tegola). Certain routes (i.e. capabilities) build URLs which are included in the response and then passed back to the proxy. Without the ability to set a URI prefix, the URLs in the capabilities responses will not be useable by the consuming client. Setting the webserver hostname now ignores the server port. It's assumed that if the user is setting the hostname they want full control of it. closes #136
Pull Request Test Coverage Report for Build 1752
💛 - Coveralls |
The buildout of the capabilities URLs had too many moving parts and was being repeated in too many places. The logic has been centralized into a single function.
Could you elaborate on the following?
|
@ear7h previously if the hostname was set and a port was included in the request, the the port was appended to the hostname. For example, if I set the hostname to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I have a few nit picky change requests and some clarifications/improvements to test cases. Thank you!
@ear7h great code review. I have incorporated all your suggestions except for the last one. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added the webserver config property uri_prefix which allows for
setting an API route prefix. This is commonly used when tegola
is run behind a reverse proxy (i.e. example.com/tegola). Certain
routes (i.e. capabilities) build URLs which are included in the
response and then passed back to the proxy. Without the ability
to set a URI prefix, the URLs in the capabilities responses
will not be useable by the consuming client.
Setting the webserver hostname now ignores the server port. It's
assumed that if the user is setting the hostname they want full
control of it.
closes #136