File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ const (
6262 contentTypeTextHTML = "text/html"
6363 contentTypeJSON = "application/json"
6464 hstsValue = "max-age=31536000; includeSubDomains"
65+ robotsNone = "noindex, nofollow"
6566
6667 headerAllow = "Allow"
6768 headerCacheControl = "Cache-Control"
@@ -71,6 +72,7 @@ const (
7172 headerOrigin = "Origin"
7273 headerSetCookie = "Set-Cookie"
7374 headerHSTS = "Strict-Transport-Security"
75+ headerRobots = "X-Robots-Tag"
7476
7577 headerRequestID = "X-Drawbridge-Request-ID"
7678 headerUser = "X-Drawbridge-User"
@@ -337,6 +339,8 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
337339 rw .Header ().Set (headerHSTS , hstsValue )
338340
339341 if host == h .cfg .DomainDrawbridge {
342+ rw .Header ().Set (headerRobots , robotsNone )
343+
340344 rc := http .NewResponseController (w )
341345 _ = rc .SetReadDeadline (time .Now ().Add (httpInternalReadTimeout ))
342346 defer rc .SetReadDeadline (time.Time {})
You can’t perform that action at this time.
0 commit comments