updates on editor

This commit is contained in:
Henrique Dias committed 2017-07-01 08:36:28 +01:00
1 parent 98af5807f1
commit 3d25185a55
23 files changed
+246 -137

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ func serveHTTP(c *requestContext, w http.ResponseWriter, r *http.Request) (int,
// Checks if the URL contains the baseURL. If so, it strips it. Otherwise,
// it throws an error.
if p := strings.TrimPrefix(r.URL.Path, c.fm.baseURL); len(p) < len(r.URL.Path) {
if p := strings.TrimPrefix(r.URL.Path, c.fm.baseURL); len(p) < len(r.URL.Path) || len(c.fm.baseURL) == 0 {
r.URL.Path = p
} else {
return http.StatusNotFound, nil