Commit 0c664e4a authored by Jacob Vosmaer's avatar Jacob Vosmaer

Move comment

parent 0d5831b6
...@@ -7,6 +7,8 @@ import ( ...@@ -7,6 +7,8 @@ import (
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper" "gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
) )
// Prevent internal API responses intended for gitlab-workhorse from
// leaking to the end user
func Block(h http.Handler) http.Handler { func Block(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
rw := &blocker{rw: w} rw := &blocker{rw: w}
...@@ -21,8 +23,6 @@ type blocker struct { ...@@ -21,8 +23,6 @@ type blocker struct {
status int status int
} }
// Prevent internal API responses intended for gitlab-workhorse from
// leaking to the end user
func (b *blocker) Header() http.Header { func (b *blocker) Header() http.Header {
return b.rw.Header() return b.rw.Header()
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment