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

promtail: fix externalURL and path prefix issues #1026

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

erwinvaneyk
Copy link
Contributor

Currently the UI of promtail breaks when it is exposed on a subpath. I found and resolved two issues:

  1. Both ExternalURL and PathPrefix need to be set to expose it on a subpath. PathPrefix configures the mux, and ExternalURL is used to configure the urls in the templates. I added line 53 ensure that users only need to set the ExternalURL.

  2. The root redirects directly to /targets and does not account for the path prefix. This PR adds the path prefix to this redirect.

As a flyby, I replaced the background contexts with the context present in the HTTP request.

@CLAassistant
Copy link

CLAassistant commented Sep 18, 2019

CLA assistant check
All committers have signed the CLA.

@sh0rez
Copy link
Member

sh0rez commented Sep 18, 2019

Hi, check the CI please, you have issues compiling

@erwinvaneyk
Copy link
Contributor Author

Whoops, thanks @sh0rez 🙂

@cyriltovena
Copy link
Contributor

Awesome thank you for this

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit 297cc63 into grafana:master Sep 19, 2019
@erwinvaneyk erwinvaneyk deleted the fix-path-prefix branch September 20, 2019 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants