You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
Strip path from initial request and consistency changes
Former-commit-id: ff268e5bbdbcb41bc49725e03cd5afae58882eae [formerly a28207f461e64d25d113fe71393fd69d6d421f32] [formerly 6345aaf2af5ad3ef9923f35de5e0f16dfdafbf55 [formerly 5f98fd89a8]]
Former-commit-id: 975ee9c065d26fb99bd3a4e84bce6dceac08fd27 [formerly 6bd35709641b93c753ae109d1207933a3805b779]
Former-commit-id: fcc27613bde5397d6463fd9c2465a1e554b9407b
This commit is contained in:
@@ -77,7 +77,7 @@ func command(ctx *requestContext, w http.ResponseWriter, r *http.Request) (int,
|
||||
}
|
||||
|
||||
// Gets the path and initializes a buffer.
|
||||
path := strings.Replace(r.URL.Path, ctx.FileManager.BaseURL, ctx.User.scope, 1)
|
||||
path := ctx.User.scope + "/" + r.URL.Path
|
||||
path = filepath.Clean(path)
|
||||
buff := new(bytes.Buffer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user