summaryrefslogtreecommitdiff
path: root/service/static/service.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-30 18:47:20 +0300
committerWolfy-J <[email protected]>2018-09-30 18:47:20 +0300
commitc7b6b81c044305a3d65d1d53eb7f7bc172b37bf2 (patch)
tree186565b7602da6cbf851375afeda7f6b98ccfacb /service/static/service.go
parent06f0a97e81905c880dc83813dd5b7f6f458ca724 (diff)
more tests
Diffstat (limited to 'service/static/service.go')
-rw-r--r--service/static/service.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/service/static/service.go b/service/static/service.go
index 0c101ceb..b2723e42 100644
--- a/service/static/service.go
+++ b/service/static/service.go
@@ -4,7 +4,6 @@ import (
rrttp "github.com/spiral/roadrunner/service/http"
"net/http"
"path"
- "strings"
)
// ID contains default service name.
@@ -44,12 +43,7 @@ func (s *Service) middleware(f http.HandlerFunc) http.HandlerFunc {
}
func (s *Service) handleStatic(w http.ResponseWriter, r *http.Request) bool {
- fPath := r.URL.Path
-
- if !strings.HasPrefix(fPath, "/") {
- fPath = "/" + fPath
- }
- fPath = path.Clean(fPath)
+ fPath := path.Clean(r.URL.Path)
if s.cfg.Forbids(fPath) {
return false