Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuomo Ala-Vannesluoma <tuomoav@gmail.com>2018-04-06 18:23:58 +0300
committerTuomo Ala-Vannesluoma <tuomoav@gmail.com>2018-06-30 22:50:19 +0300
commit9cf40354085f4b4446f06d4d03926dcaa6ab9565 (patch)
treeeb6ade3a82feec5f9b258417f41a8fecd3e9aec9 /server.go
parentc4a419ed595281f62977fd47aa30d225c4eddb5d (diff)
Add support for private projects and authentication with GitLab API
Diffstat (limited to 'server.go')
-rw-r--r--server.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/server.go b/server.go
index cfd6b993..120088b0 100644
--- a/server.go
+++ b/server.go
@@ -8,6 +8,7 @@ import (
"os"
"time"
+ "github.com/gorilla/context"
"golang.org/x/net/http2"
)
@@ -29,7 +30,7 @@ func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
func listenAndServe(fd uintptr, handler http.HandlerFunc, useHTTP2 bool, tlsConfig *tls.Config) error {
// create server
- server := &http.Server{Handler: handler, TLSConfig: tlsConfig}
+ server := &http.Server{Handler: context.ClearHandler(handler), TLSConfig: tlsConfig}
if useHTTP2 {
err := http2.ConfigureServer(server, &http2.Server{})