2024-09-17 01:01:42 +00:00
|
|
|
package fasthttp
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Headers.
|
2024-09-17 01:01:42 +00:00
|
|
|
const (
|
2024-09-26 01:59:44 +00:00
|
|
|
// Authentication.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAuthorization = "Authorization"
|
|
|
|
HeaderProxyAuthenticate = "Proxy-Authenticate"
|
|
|
|
HeaderProxyAuthorization = "Proxy-Authorization"
|
|
|
|
HeaderWWWAuthenticate = "WWW-Authenticate"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Caching.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAge = "Age"
|
|
|
|
HeaderCacheControl = "Cache-Control"
|
|
|
|
HeaderClearSiteData = "Clear-Site-Data"
|
|
|
|
HeaderExpires = "Expires"
|
|
|
|
HeaderPragma = "Pragma"
|
|
|
|
HeaderWarning = "Warning"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Client hints.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAcceptCH = "Accept-CH"
|
|
|
|
HeaderAcceptCHLifetime = "Accept-CH-Lifetime"
|
|
|
|
HeaderContentDPR = "Content-DPR"
|
|
|
|
HeaderDPR = "DPR"
|
|
|
|
HeaderEarlyData = "Early-Data"
|
|
|
|
HeaderSaveData = "Save-Data"
|
|
|
|
HeaderViewportWidth = "Viewport-Width"
|
|
|
|
HeaderWidth = "Width"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Conditionals.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderETag = "ETag"
|
|
|
|
HeaderIfMatch = "If-Match"
|
|
|
|
HeaderIfModifiedSince = "If-Modified-Since"
|
|
|
|
HeaderIfNoneMatch = "If-None-Match"
|
|
|
|
HeaderIfUnmodifiedSince = "If-Unmodified-Since"
|
|
|
|
HeaderLastModified = "Last-Modified"
|
|
|
|
HeaderVary = "Vary"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Connection management.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderConnection = "Connection"
|
|
|
|
HeaderKeepAlive = "Keep-Alive"
|
|
|
|
HeaderProxyConnection = "Proxy-Connection"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Content negotiation.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAccept = "Accept"
|
|
|
|
HeaderAcceptCharset = "Accept-Charset"
|
|
|
|
HeaderAcceptEncoding = "Accept-Encoding"
|
|
|
|
HeaderAcceptLanguage = "Accept-Language"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Controls.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderCookie = "Cookie"
|
|
|
|
HeaderExpect = "Expect"
|
|
|
|
HeaderMaxForwards = "Max-Forwards"
|
|
|
|
HeaderSetCookie = "Set-Cookie"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// CORS.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
|
|
|
|
HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
|
|
|
|
HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
|
|
|
|
HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
|
|
|
|
HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
|
|
|
|
HeaderAccessControlMaxAge = "Access-Control-Max-Age"
|
|
|
|
HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
|
|
|
|
HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
|
|
|
|
HeaderOrigin = "Origin"
|
|
|
|
HeaderTimingAllowOrigin = "Timing-Allow-Origin"
|
|
|
|
HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Do Not Track.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderDNT = "DNT"
|
|
|
|
HeaderTk = "Tk"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Downloads.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderContentDisposition = "Content-Disposition"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Message body information.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderContentEncoding = "Content-Encoding"
|
|
|
|
HeaderContentLanguage = "Content-Language"
|
|
|
|
HeaderContentLength = "Content-Length"
|
|
|
|
HeaderContentLocation = "Content-Location"
|
|
|
|
HeaderContentType = "Content-Type"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Proxies.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderForwarded = "Forwarded"
|
|
|
|
HeaderVia = "Via"
|
|
|
|
HeaderXForwardedFor = "X-Forwarded-For"
|
|
|
|
HeaderXForwardedHost = "X-Forwarded-Host"
|
|
|
|
HeaderXForwardedProto = "X-Forwarded-Proto"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Redirects.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderLocation = "Location"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Request context.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderFrom = "From"
|
|
|
|
HeaderHost = "Host"
|
|
|
|
HeaderReferer = "Referer"
|
|
|
|
HeaderReferrerPolicy = "Referrer-Policy"
|
|
|
|
HeaderUserAgent = "User-Agent"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Response context.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAllow = "Allow"
|
|
|
|
HeaderServer = "Server"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Range requests.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAcceptRanges = "Accept-Ranges"
|
|
|
|
HeaderContentRange = "Content-Range"
|
|
|
|
HeaderIfRange = "If-Range"
|
|
|
|
HeaderRange = "Range"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Security.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderContentSecurityPolicy = "Content-Security-Policy"
|
|
|
|
HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
|
|
|
|
HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"
|
|
|
|
HeaderExpectCT = "Expect-CT"
|
|
|
|
HeaderFeaturePolicy = "Feature-Policy"
|
|
|
|
HeaderPublicKeyPins = "Public-Key-Pins"
|
|
|
|
HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
|
|
|
|
HeaderStrictTransportSecurity = "Strict-Transport-Security"
|
|
|
|
HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
|
|
|
|
HeaderXContentTypeOptions = "X-Content-Type-Options"
|
|
|
|
HeaderXDownloadOptions = "X-Download-Options"
|
|
|
|
HeaderXFrameOptions = "X-Frame-Options"
|
|
|
|
HeaderXPoweredBy = "X-Powered-By"
|
|
|
|
HeaderXXSSProtection = "X-XSS-Protection"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Server-sent event.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderLastEventID = "Last-Event-ID"
|
|
|
|
HeaderNEL = "NEL"
|
|
|
|
HeaderPingFrom = "Ping-From"
|
|
|
|
HeaderPingTo = "Ping-To"
|
|
|
|
HeaderReportTo = "Report-To"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Transfer coding.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderTE = "TE"
|
|
|
|
HeaderTrailer = "Trailer"
|
|
|
|
HeaderTransferEncoding = "Transfer-Encoding"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// WebSockets.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"
|
2024-09-26 01:59:44 +00:00
|
|
|
HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions" // #nosec G101
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderSecWebSocketKey = "Sec-WebSocket-Key"
|
|
|
|
HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"
|
|
|
|
HeaderSecWebSocketVersion = "Sec-WebSocket-Version"
|
|
|
|
|
2024-09-26 01:59:44 +00:00
|
|
|
// Other.
|
2024-09-17 01:01:42 +00:00
|
|
|
HeaderAcceptPatch = "Accept-Patch"
|
|
|
|
HeaderAcceptPushPolicy = "Accept-Push-Policy"
|
|
|
|
HeaderAcceptSignature = "Accept-Signature"
|
|
|
|
HeaderAltSvc = "Alt-Svc"
|
|
|
|
HeaderDate = "Date"
|
|
|
|
HeaderIndex = "Index"
|
|
|
|
HeaderLargeAllocation = "Large-Allocation"
|
|
|
|
HeaderLink = "Link"
|
|
|
|
HeaderPushPolicy = "Push-Policy"
|
|
|
|
HeaderRetryAfter = "Retry-After"
|
|
|
|
HeaderServerTiming = "Server-Timing"
|
|
|
|
HeaderSignature = "Signature"
|
|
|
|
HeaderSignedHeaders = "Signed-Headers"
|
|
|
|
HeaderSourceMap = "SourceMap"
|
|
|
|
HeaderUpgrade = "Upgrade"
|
|
|
|
HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"
|
|
|
|
HeaderXPingback = "X-Pingback"
|
|
|
|
HeaderXRequestedWith = "X-Requested-With"
|
|
|
|
HeaderXRobotsTag = "X-Robots-Tag"
|
|
|
|
HeaderXUACompatible = "X-UA-Compatible"
|
|
|
|
)
|