Browse Source

Prevent browsers from leaking referrer headers

Duncan 9 years ago
parent
commit
a6596f2231
3 changed files with 3 additions and 0 deletions
  1. 1 0
      templates/base/head.tmpl
  2. 1 0
      templates/base/head_old.tmpl
  3. 1 0
      templates/ng/base/head.tmpl

+ 1 - 0
templates/base/head.tmpl

@@ -6,6 +6,7 @@
 	<meta name="author" content="Gogs - Go Git Service" />
 	<meta name="description" content="Gogs(Go Git Service) a painless self-hosted Git Service written in Go" />
 	<meta name="keywords" content="go, git, self-hosted, gogs">
+	<meta name="referrer" content="no-referrer" />
 	<meta name="_csrf" content="{{.CsrfToken}}" />
 	{{if .GoGetImport}}
 	<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">

+ 1 - 0
templates/base/head_old.tmpl

@@ -8,6 +8,7 @@
         <meta name="author" content="Gogs - Go Git Service" />
 		<meta name="description" content="Gogs(Go Git Service) is a GitHub-like clone in the Go Programming Language" />
 		<meta name="keywords" content="go, git">
+		<meta name="referrer" content="no-referrer" />
 		<meta name="_csrf" content="{{.CsrfToken}}" />
 		{{if .GoGetImport}}<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">{{end}}
 

+ 1 - 0
templates/ng/base/head.tmpl

@@ -6,6 +6,7 @@
         <meta name="author" content="Gogs - Go Git Service" />
 		<meta name="description" content="Gogs(Go Git Service) a painless self-hosted Git Service written in Go" />
 		<meta name="keywords" content="go, git, self-hosted, gogs">
+		<meta name="referrer" content="no-referrer" />
 		<meta name="_csrf" content="{{.CsrfToken}}" />
 		{{if .GoGetImport}}<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">{{end}}