Fix panic when using complex dynamic URLs in app plugin routes (#27977)

* remove unused function to interpolate URLs

* share function to add headers between ds/plugin proxies

* stop performing unnecessary plugin setting lookup

* fix bug causing runtime errors when using complex templated URLs

* lower case util functions not used outside of pluginproxy package

* change test URL to a (valid) dummy URL to make intent clearer

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Victor Cinaglia
2020-11-17 04:56:42 -05:00
committed by GitHub
parent 0f3bebb38d
commit 967e9b39e8
8 changed files with 104 additions and 152 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ func TestDsAuthProvider(t *testing.T) {
},
}
interpolated, err := InterpolateString("{{.SecureJsonData.Test}}", data)
interpolated, err := interpolateString("{{.SecureJsonData.Test}}", data)
So(err, ShouldBeNil)
So(interpolated, ShouldEqual, "0asd+asd")
})