mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:12:54 +08:00
ServeFromSubPath: Redirect to URL with subpath when subpath missing (#66724)
* ServeFromSubPath: Redirect to URL with subpath when subpath missing * Review fixes * Added tests * Use constant * change to useMiddleware * Update pkg/middleware/subpath_redirect.go --------- Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
This commit is contained in:
@ -99,7 +99,10 @@ func (sc *scenarioContext) fakeReqWithParams(method, url string, queryParams map
|
||||
for k, v := range queryParams {
|
||||
q.Add(k, v)
|
||||
}
|
||||
|
||||
req.URL.RawQuery = q.Encode()
|
||||
req.RequestURI = req.URL.RequestURI()
|
||||
|
||||
require.NoError(sc.t, err)
|
||||
|
||||
reqCtx := &contextmodel.ReqContext{
|
||||
|
Reference in New Issue
Block a user