-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Avoid rewriting URLs in the proxy, if the application is proxy-aware. #14697
Conversation
// Add back the trailing slash, which was stripped by path.Join(). | ||
url.Path += "/" | ||
// Do not rewrite URL if the sourceURL already contains the necessary prefix. | ||
if !strings.HasPrefix(url.Path, t.PathPrepend) { |
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.
nit: Phrase in positive:
if strings.HasPrefix(url.Path, t.PathPrepend) {
return url.String()
}
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.
Done
LGTM |
From our chat this morning, I'm guessing you'll probably want to cherry-pick this. |
Yeah. This one and another patch that updated Grafana configs. On Mon, Sep 28, 2015 at 5:22 PM, Daniel Smith notifications@github.com
|
Unit, integration and GCE e2e test build/test passed for commit ee20ca07d1293203d08771256e3ddd8a73b98c2d. |
Unit, integration and GCE e2e build/test failed for commit e048cd445da3104a667c5af9616be09b7d406ec7. |
Unit, integration and GCE e2e test build/test passed for commit 2788b47. |
Labelling this PR as size/S |
@davidopp: This PR needs to go in soon because it needs to be cherry-picked into v1.1 |
Tests finally passed, merging manually. |
Avoid rewriting URLs in the proxy, if the application is proxy-aware.
Related to #14624
cc @lavalamp