mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Server: Add X-Robots-Tag response header to control search engines #4574
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -31,12 +31,7 @@ func AddDownloadHeader(c *gin.Context, fileName string) {
|
||||
c.Header(header.ContentDisposition, fmt.Sprintf("attachment; filename=%s", fileName))
|
||||
}
|
||||
|
||||
// AddAuthTokenHeader adds an X-Auth-Token header to the response.
|
||||
func AddAuthTokenHeader(c *gin.Context, authToken string) {
|
||||
c.Header(header.XAuthToken, authToken)
|
||||
}
|
||||
|
||||
// AddContentTypeHeader adds a content type header to the response.
|
||||
// AddContentTypeHeader adds a "Content-Type" header to the response.
|
||||
func AddContentTypeHeader(c *gin.Context, contentType string) {
|
||||
c.Header(header.ContentType, contentType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user