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

Shorten url corrupted after generation #28297

Closed
johnatannvmd opened this issue Oct 15, 2020 · 4 comments · Fixed by #28300
Closed

Shorten url corrupted after generation #28297

johnatannvmd opened this issue Oct 15, 2020 · 4 comments · Fixed by #28300
Assignees
Labels
Milestone

Comments

@johnatannvmd
Copy link

Before generation:
image

After generation:
image

Shortlink from the explore same without "/"

We use reverse proxy before several grafana servers

[server]
# Protocol (http, https, socket)
protocol = http

# The ip address to bind to, empty will bind to all interfaces
http_addr = 0.0.0.0

# The http port  to use
http_port = 3000

# The public facing domain name used to access grafana from a browser
domain = grafana-beta.<redacted>

# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
enforce_domain = true

# The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path)
root_url = https://grafana-beta.<redacted>
@ivanahuckova ivanahuckova self-assigned this Oct 15, 2020
@ivanahuckova
Copy link
Member

ivanahuckova commented Oct 15, 2020

@marefr @aknuds1 the url := path.Join(setting.AppUrl, "goto", shortURL.Uid) cuts of 1 / in https://. I am wondering, if we should just build url on frontend and remove it's creation from the backend, or should we just fix it on backend - and just return uid? Thoughts?

@aknuds1
Copy link
Contributor

aknuds1 commented Oct 15, 2020

@ivanahuckova Ah, I think it should possibly be fmt.Sprintf("%s/%s", setting.AppUrl, path.Join("goto", shortURL.Uid)). I'll have to test.

@aknuds1
Copy link
Contributor

aknuds1 commented Oct 15, 2020

@ivanahuckova Yep, can confirm.

@aknuds1
Copy link
Contributor

aknuds1 commented Oct 15, 2020

Thanks! Have a fix.

@ivanahuckova ivanahuckova modified the milestones: 7.2.2, 7.3.0 Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants