photoprism/pkg/header/content.go
Michael Mayer da10b30fdf API: Add auth token to vary header for caching proxies and CDNs #3931
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 16:42:21 +01:00

25 lines
687 B
Go

package header
import "strings"
// Content header names.
const (
Accept = "Accept"
AcceptEncoding = "Accept-Encoding"
AcceptRanges = "Accept-Ranges"
ContentType = "Content-Type"
ContentTypeForm = "application/x-www-form-urlencoded"
ContentTypeJson = "application/json"
ContentDisposition = "Content-Disposition"
ContentEncoding = "Content-Encoding"
ContentRange = "Content-Range"
Location = "Location"
Origin = "Origin"
Vary = "Vary"
)
// Content header defaults.
var (
DefaultVaryHeaders = []string{XAuthToken, AcceptEncoding}
DefaultVary = strings.Join(DefaultVaryHeaders, ", ")
)