Updates on auth and db

This commit is contained in:
Henrique Dias committed 2017-07-03 08:59:49 +01:00
1 parent 1d235c9852
commit 6312c60b2e
10 files changed
+303 -272

No files matched your search

+2 -2
View File
@@ -19,9 +19,9 @@ type requestContext struct {
func serveHTTP(c *requestContext, w http.ResponseWriter, r *http.Request) (int, error) {
// Checks if the URL contains the baseURL and strips it. Otherwise, it just
// returns a 404 error because we're not supposed to be here!
p := strings.TrimPrefix(r.URL.Path, c.fm.baseURL)
p := strings.TrimPrefix(r.URL.Path, c.fm.BaseURL)
if len(p) >= len(r.URL.Path) && c.fm.baseURL != "" {
if len(p) >= len(r.URL.Path) && c.fm.BaseURL != "" {
return http.StatusNotFound, nil
}