Updates on auth and db
Former-commit-id: cdcfc50a4a7274482826520644019d54c37a7753 [formerly 376d2422063755c75d5b5c8e21bf8617ca3a9baf] [formerly ea860508c1603296e0439a583ca0573609be3511 [formerly 6312c60b2e99446d0934be5c92a7929efff93a08]] Former-commit-id: d64b8b836568b150853288a69f870662e92db1e0 [formerly b85b1a09bbf87c1b5f2af07659121ef51a74f05e] Former-commit-id: ee164251a6143567da3f970e347ede0d6de1d350
This commit is contained in:
4
http.go
4
http.go
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user