Merge pull request #268 from writeas/noindex-invite-links

Add 'X-Robots-Tag: noindex' header to invite URLs
This commit is contained in:
Matt Baer 2020-03-16 13:38:18 -04:00 committed by GitHub
commit 06054a2cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,9 @@ func handleViewInvite(app *App, w http.ResponseWriter, r *http.Request) error {
p.Error = "This invite link has expired." p.Error = "This invite link has expired."
} }
// Tell search engines not to index invite links
w.Header().Set("X-Robots-Tag", "noindex")
// Get error messages // Get error messages
session, err := app.sessionStore.Get(r, cookieName) session, err := app.sessionStore.Get(r, cookieName)
if err != nil { if err != nil {