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-10-04 19:36:52 +0300
committerTuomo Ala-Vannesluoma <tuomoav@gmail.com>2018-10-04 19:36:52 +0300
commitf919cbee022c7d71bfbe83e7188843fcab5deca6 (patch)
tree0828ad0230ba96e293ddd93271b0d74308e39fff /internal/auth
parent934846801003e59e006d8ca47d985c6102bc93aa (diff)
Set session cookie HttpOnly to true
Diffstat (limited to 'internal/auth')
-rw-r--r--internal/auth/auth.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/auth/auth.go b/internal/auth/auth.go
index 2dbda013..c9f10961 100644
--- a/internal/auth/auth.go
+++ b/internal/auth/auth.go
@@ -59,7 +59,8 @@ func (a *Auth) getSessionFromStore(r *http.Request) (*sessions.Session, error) {
if session != nil {
// Cookie just for this domain
session.Options = &sessions.Options{
- Path: "/",
+ Path: "/",
+ HttpOnly: true,
}
}