Fixes #527: Allow suburl to map the application #528
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instructions
Please try and perform pull requests against the
develop
branch.Merging against the master branch causes a new release to be deployed, and I'd like to avoid that on every PR.
PR Details
Fixed an issue where the base url was ignored when calling the websocket api of the metrics page when accessing through a reverse proxy
Description
As already pointed out in issue #527, when accessing through a reverse proxy, when a url with a base path is used, the base path is ignored and the metrics page is not properly loaded. (e.g. https://www.example.com/elastichq)
The reason is that the subpath of the url entered when establishing a connection to the socket.io is recognized as a namespace. In order to use the subpath of the reverse proxy as it is, a custom path must be set separately.
For example, if you enter url as the following, the socket will connect to the
elastichq
namespace.To include elastichq in the custom path as intended, it should be modified as follows.
So, I separated the url part and the baseurl part, and modified it to establish the connection in the correct way.
I tested through the nginx proxy environment of kubernetes, and it worked fine in my case. There seems to be a lot of similar questions, so I send a pull request with the modified version. If there is anything wrong, please comment. I hope it helps.
Related Issue
#527