Disallow indexing of all file pages
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
<title>{{.Title}}</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
{{ template "opengraph" .OGData }}
|
||||
|
||||
<link id="stylesheet_layout" rel="stylesheet" type="text/css" href="/res/style/layout.css?v{{cacheID}}"/>
|
||||
|
@@ -5,6 +5,7 @@
|
||||
<title>{{.Title}}</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<link id="stylesheet_layout" rel="stylesheet" type="text/css" href="/res/style/layout.css?v{{cacheID}}"/>
|
||||
<link id="stylesheet_theme" rel="stylesheet" type="text/css" href="/theme.css"/>
|
||||
|
@@ -60,6 +60,9 @@ func (wc *WebController) serveFileViewer(w http.ResponseWriter, r *http.Request,
|
||||
return
|
||||
}
|
||||
|
||||
// Prevent search engines from indexing this page for privacy reasons
|
||||
w.Header().Set("X-Robots-Tag", "noindex, nofollow")
|
||||
|
||||
var err error
|
||||
var ids = strings.Split(p.ByName("id"), ",")
|
||||
var templateData = wc.newTemplateData(w, r)
|
||||
@@ -142,6 +145,9 @@ func (wc *WebController) serveListViewer(w http.ResponseWriter, r *http.Request,
|
||||
return
|
||||
}
|
||||
|
||||
// Prevent search engines from indexing this page for privacy reasons
|
||||
w.Header().Set("X-Robots-Tag", "noindex, nofollow")
|
||||
|
||||
var templateData = wc.newTemplateData(w, r)
|
||||
var list, err = templateData.PixelAPI.GetListID(p.ByName("id"))
|
||||
if err != nil {
|
||||
|
@@ -17,6 +17,9 @@ func (wc *WebController) serveDirectory(w http.ResponseWriter, r *http.Request,
|
||||
var td = wc.newTemplateData(w, r)
|
||||
var path = strings.TrimPrefix(p.ByName("path"), "/")
|
||||
|
||||
// Prevent search engines from indexing this page for privacy reasons
|
||||
w.Header().Set("X-Robots-Tag", "noindex, nofollow")
|
||||
|
||||
if path == "" {
|
||||
wc.templates.Get().ExecuteTemplate(w, "404", td)
|
||||
return
|
||||
|
Reference in New Issue
Block a user