Trim BaseURL

This commit is contained in:
Henrique Dias committed 2017-06-27 10:31:50 +01:00
1 parent 1d26b8e95e
commit 6bce6fb584
5 files changed
+22 -9

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ const assetsURL = "/_internal"
// Serve provides the needed assets for the front-end
func serveAssets(ctx *requestContext, w http.ResponseWriter, r *http.Request) (int, error) {
// gets the filename to be used with Assets function
filename := strings.Replace(r.URL.Path, ctx.FileManager.BaseURL+assetsURL, "", 1)
filename := strings.TrimPrefix(r.URL.Path, assetsURL)
var file []byte
var err error