headers.go 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. package fasthttp
  2. // Headers.
  3. const (
  4. // Authentication.
  5. HeaderAuthorization = "Authorization"
  6. HeaderProxyAuthenticate = "Proxy-Authenticate"
  7. HeaderProxyAuthorization = "Proxy-Authorization"
  8. HeaderWWWAuthenticate = "WWW-Authenticate"
  9. // Caching.
  10. HeaderAge = "Age"
  11. HeaderCacheControl = "Cache-Control"
  12. HeaderClearSiteData = "Clear-Site-Data"
  13. HeaderExpires = "Expires"
  14. HeaderPragma = "Pragma"
  15. HeaderWarning = "Warning"
  16. // Client hints.
  17. HeaderAcceptCH = "Accept-CH"
  18. HeaderAcceptCHLifetime = "Accept-CH-Lifetime"
  19. HeaderContentDPR = "Content-DPR"
  20. HeaderDPR = "DPR"
  21. HeaderEarlyData = "Early-Data"
  22. HeaderSaveData = "Save-Data"
  23. HeaderViewportWidth = "Viewport-Width"
  24. HeaderWidth = "Width"
  25. // Conditionals.
  26. HeaderETag = "ETag"
  27. HeaderIfMatch = "If-Match"
  28. HeaderIfModifiedSince = "If-Modified-Since"
  29. HeaderIfNoneMatch = "If-None-Match"
  30. HeaderIfUnmodifiedSince = "If-Unmodified-Since"
  31. HeaderLastModified = "Last-Modified"
  32. HeaderVary = "Vary"
  33. // Connection management.
  34. HeaderConnection = "Connection"
  35. HeaderKeepAlive = "Keep-Alive"
  36. HeaderProxyConnection = "Proxy-Connection"
  37. // Content negotiation.
  38. HeaderAccept = "Accept"
  39. HeaderAcceptCharset = "Accept-Charset"
  40. HeaderAcceptEncoding = "Accept-Encoding"
  41. HeaderAcceptLanguage = "Accept-Language"
  42. // Controls.
  43. HeaderCookie = "Cookie"
  44. HeaderExpect = "Expect"
  45. HeaderMaxForwards = "Max-Forwards"
  46. HeaderSetCookie = "Set-Cookie"
  47. // CORS.
  48. HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
  49. HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
  50. HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
  51. HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
  52. HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
  53. HeaderAccessControlMaxAge = "Access-Control-Max-Age"
  54. HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
  55. HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
  56. HeaderOrigin = "Origin"
  57. HeaderTimingAllowOrigin = "Timing-Allow-Origin"
  58. HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"
  59. // Do Not Track.
  60. HeaderDNT = "DNT"
  61. HeaderTk = "Tk"
  62. // Downloads.
  63. HeaderContentDisposition = "Content-Disposition"
  64. // Message body information.
  65. HeaderContentEncoding = "Content-Encoding"
  66. HeaderContentLanguage = "Content-Language"
  67. HeaderContentLength = "Content-Length"
  68. HeaderContentLocation = "Content-Location"
  69. HeaderContentType = "Content-Type"
  70. // Proxies.
  71. HeaderForwarded = "Forwarded"
  72. HeaderVia = "Via"
  73. HeaderXForwardedFor = "X-Forwarded-For"
  74. HeaderXForwardedHost = "X-Forwarded-Host"
  75. HeaderXForwardedProto = "X-Forwarded-Proto"
  76. // Redirects.
  77. HeaderLocation = "Location"
  78. // Request context.
  79. HeaderFrom = "From"
  80. HeaderHost = "Host"
  81. HeaderReferer = "Referer"
  82. HeaderReferrerPolicy = "Referrer-Policy"
  83. HeaderUserAgent = "User-Agent"
  84. // Response context.
  85. HeaderAllow = "Allow"
  86. HeaderServer = "Server"
  87. // Range requests.
  88. HeaderAcceptRanges = "Accept-Ranges"
  89. HeaderContentRange = "Content-Range"
  90. HeaderIfRange = "If-Range"
  91. HeaderRange = "Range"
  92. // Security.
  93. HeaderContentSecurityPolicy = "Content-Security-Policy"
  94. HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
  95. HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"
  96. HeaderExpectCT = "Expect-CT"
  97. HeaderFeaturePolicy = "Feature-Policy"
  98. HeaderPublicKeyPins = "Public-Key-Pins"
  99. HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
  100. HeaderStrictTransportSecurity = "Strict-Transport-Security"
  101. HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
  102. HeaderXContentTypeOptions = "X-Content-Type-Options"
  103. HeaderXDownloadOptions = "X-Download-Options"
  104. HeaderXFrameOptions = "X-Frame-Options"
  105. HeaderXPoweredBy = "X-Powered-By"
  106. HeaderXXSSProtection = "X-XSS-Protection"
  107. // Server-sent event.
  108. HeaderLastEventID = "Last-Event-ID"
  109. HeaderNEL = "NEL"
  110. HeaderPingFrom = "Ping-From"
  111. HeaderPingTo = "Ping-To"
  112. HeaderReportTo = "Report-To"
  113. // Transfer coding.
  114. HeaderTE = "TE"
  115. HeaderTrailer = "Trailer"
  116. HeaderTransferEncoding = "Transfer-Encoding"
  117. // WebSockets.
  118. HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"
  119. HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions" /* #nosec G101 */
  120. HeaderSecWebSocketKey = "Sec-WebSocket-Key"
  121. HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"
  122. HeaderSecWebSocketVersion = "Sec-WebSocket-Version"
  123. // Other.
  124. HeaderAcceptPatch = "Accept-Patch"
  125. HeaderAcceptPushPolicy = "Accept-Push-Policy"
  126. HeaderAcceptSignature = "Accept-Signature"
  127. HeaderAltSvc = "Alt-Svc"
  128. HeaderDate = "Date"
  129. HeaderIndex = "Index"
  130. HeaderLargeAllocation = "Large-Allocation"
  131. HeaderLink = "Link"
  132. HeaderPushPolicy = "Push-Policy"
  133. HeaderRetryAfter = "Retry-After"
  134. HeaderServerTiming = "Server-Timing"
  135. HeaderSignature = "Signature"
  136. HeaderSignedHeaders = "Signed-Headers"
  137. HeaderSourceMap = "SourceMap"
  138. HeaderUpgrade = "Upgrade"
  139. HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"
  140. HeaderXPingback = "X-Pingback"
  141. HeaderXRequestedWith = "X-Requested-With"
  142. HeaderXRobotsTag = "X-Robots-Tag"
  143. HeaderXUACompatible = "X-UA-Compatible"
  144. )