Skip to content
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

[victoriametrics] Taking into account http.pathPrefix for the webui logo URL. #5306

Closed
crocchietta opened this issue Nov 9, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@crocchietta
Copy link

Describe the bug

I don't know if this is a bug or a configuration problem for me.
When using -http.pathPrefix, it is not taken into account when clicking on the logo.
For example, if http.pathPrefix=victoria01, the logo URL is not https://@ip/victoria01 but https://@ip/.

To Reproduce

configure -http.pathPrefix, go to the targets page then click on the VictoriaMetrics logo.
image

Version

victoria-metrics-20230602-095850-tags-v1.91.2-0-gde9481208

Logs

No response

Screenshots

image

Used command-line flags

No response

Additional information

No response

@crocchietta crocchietta added the bug Something isn't working label Nov 9, 2023
@zekker6 zekker6 self-assigned this Nov 9, 2023
zekker6 added a commit that referenced this issue Nov 9, 2023
… page header

- fix page header link rendering
- fix rendering of favicon.ico link

See: #5306
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
@zekker6
Copy link
Contributor

zekker6 commented Nov 9, 2023

Hello @crocchietta, thank you for the report!
The fix have been created here - #5307 .
Before this is released, you can build VictoriaMetrics from sources and verify if the issue is fixed for you.

valyala added a commit that referenced this issue Nov 13, 2023
…on.ico

This allows hiding VictoriaMetrics components behind proxies with arbitrary path prefixes.
For example, vmagent HTTP handlers can be served via /vmagent/ path prefix:

- http://proxy/vmagent/targets
- http://proxy/vmagent/service-discovery

The path prefix can be arbitrary. For example, below are vmagent urls
for /tenantID/vmagent/ path prefix:

- http://proxy/tenantID/vmagent/targets
- http://proxy/tenantID/vmagent/service-discovery

While at it, consistently serve favicon.ico from any path directory.

Updates #5306
Updates #5307
valyala added a commit that referenced this issue Nov 13, 2023
…on.ico

This allows hiding VictoriaMetrics components behind proxies with arbitrary path prefixes.
For example, vmagent HTTP handlers can be served via /vmagent/ path prefix:

- http://proxy/vmagent/targets
- http://proxy/vmagent/service-discovery

The path prefix can be arbitrary. For example, below are vmagent urls
for /tenantID/vmagent/ path prefix:

- http://proxy/tenantID/vmagent/targets
- http://proxy/tenantID/vmagent/service-discovery

While at it, consistently serve favicon.ico from any path directory.

Updates #5306
Updates #5307
@valyala
Copy link
Collaborator

valyala commented Nov 13, 2023

The related issue - #1858

@valyala
Copy link
Collaborator

valyala commented Nov 13, 2023

The issue should be fixed in the commit 8af56ea . This commit replaces absolute links to the main page and to the favicon.ico with relative links, so they should work now for any path prefix (e.g. they are independent of -http.pathPrefix command-line flag). See this comment for more details.

The commit 8af56ea will be included in the next release. In the mean time it is possible to verify whether the commit fixes the issue by building VictoriaMetrics from this commit according to these docs.

@crocchietta
Copy link
Author

Good morning. Thank you both for your intervention.
I don't have the ability to test the commit at the moment.
Not being a blocking problem, I can wait for the next version to come out.

AndrewChubatiuk pushed a commit to AndrewChubatiuk/VictoriaMetrics that referenced this issue Nov 15, 2023
…on.ico

This allows hiding VictoriaMetrics components behind proxies with arbitrary path prefixes.
For example, vmagent HTTP handlers can be served via /vmagent/ path prefix:

- http://proxy/vmagent/targets
- http://proxy/vmagent/service-discovery

The path prefix can be arbitrary. For example, below are vmagent urls
for /tenantID/vmagent/ path prefix:

- http://proxy/tenantID/vmagent/targets
- http://proxy/tenantID/vmagent/service-discovery

While at it, consistently serve favicon.ico from any path directory.

Updates VictoriaMetrics#5306
Updates VictoriaMetrics#5307
@valyala
Copy link
Collaborator

valyala commented Nov 15, 2023

The bugfix for this issue has been included in the release v1.95.0. Closing it as fixed then.

@crocchietta , feel free re-opening the issue if it still persists at v1.95.0 release.

@valyala valyala closed this as completed Nov 15, 2023
@crocchietta
Copy link
Author

I just deployed version 1.95.1 and the problem is well resolved. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants