Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CacheControlMustRevalidate that the response can be stored in caches and can be reused while fresh. CacheControlMustRevalidate = "must-revalidate" // CacheControlNoCache indicates the response must be validated with the origin server before each reuse. CacheControlNoCache = "no-cache" // CacheControlNoStore indicates that all caches should not store this response. CacheControlNoStore = "no-store" // CacheControlNoTransform indicates that any intermediary shouldn't transform the response contents. CacheControlNoTransform = "no-transform" // HeaderAccept is the key for the accept header. HeaderAccept = "Accept" // HeaderCacheControl is the key for the cache control header. HeaderCacheControl = "Cache-Control" // HeaderContentType is the key for the content type header. HeaderContentType = "Content-Type" )
View Source
const ( // MimeAll matches any mime type. MimeAll Mime = `*/*` // MimeAppJRDJSON represents a JSON Resource Descriptor type. MimeAppJRDJSON Mime = `application/jrd+json` // MimeAppJSON represents a JavaScript Object Notation type. MimeAppJSON Mime = `application/json` // MimeAppActivityJSON represents a JSON activity pub action type. MimeAppActivityJSON Mime = `application/activity+json` // MimeAppActivityLDJSON represents JSON-based Linked Data for activity streams type. MimeAppActivityLDJSON Mime = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"` // MimeAppXML represents an Extensible Markup Language type. MimeAppXML Mime = `application/xml` // MimeImageGIF represents a gif image type. MimeImageGIF Mime = `image/gif` // MimeImageJPG represents a jpg image type. MimeImageJPG Mime = `image/jpeg` // MimeImagePNG represents a png image type. MimeImagePNG Mime = `image/png` // MimeImageSVG represents a svg image type. MimeImageSVG Mime = `image/svg+xml` // MimeImageWebP represents a webp image type. MimeImageWebP Mime = `image/webp` // MimeTextCSV represents a csv type. MimeTextCSV Mime = `text/csv` // MimeTextHTML represents a html type. MimeTextHTML Mime = `text/html` // MimeTextPlain represents a plain text type. MimeTextPlain Mime = `text/plain` // SuffixAppJSON represents a JavaScript Object Notation suffix. SuffixAppJSON Suffix = `json` // SuffixAppXML represents an Extensible Markup Language suffix. SuffixAppXML Suffix = `xml` // SuffixImageGIF represents a gif image suffix. SuffixImageGIF Suffix = `gif` // SuffixImageJPG represents a jpg image suffix. SuffixImageJPG Suffix = `jpg` // SuffixImagePNG represents a png image suffix. SuffixImagePNG Suffix = `png` // SuffixImageSVG represents a svg image suffix. SuffixImageSVG Suffix = `svg` // SuffixImageWebP represents a webp image suffix. SuffixImageWebP Suffix = `webp` // SuffixTextCSV represents a csv suffix. SuffixTextCSV Suffix = `csv` // SuffixTextHTML represents a html suffix. SuffixTextHTML Suffix = `html` // SuffixTextPlain represents a plain text suffix. SuffixTextPlain Suffix = `txt` )
Variables ¶
This section is empty.
Functions ¶
func BlockFloc ¶
BlockFloc is a middleware that applies a header to tell Google Chrome to disable cohort tracking.
func BlockMissingUserAgent ¶
BlockMissingUserAgent is a middleware that returns 400 Bad Request if the useragent is missing.
func GetPageLang ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.