headers.ts
This file
Path
src/utils/headers.ts
355 lines · 7.2 KiB · TypeScript
Last changed by
Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
History of this fileTake it
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–19why, one step back1/**2 * @module3 * HTTP Headers utility.4 */56// note: https://www.iana.org/assignments/http-fields/http-fields.xhtml78export type RequestHeader =9 | 'A-IM'10 | 'Accept'11 | 'Accept-Additions'12 | 'Accept-CH'13 | 'Accept-Charset'14 | 'Accept-Datetime'15 | 'Accept-Encoding'16 | 'Accept-Features'17 | 'Accept-Language'18 | 'Accept-Patch'19 | 'Accept-Post'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 20why, one step back20 | 'Accept-Query'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 21–31why, one step back21 | 'Accept-Ranges'22 | 'Accept-Signature'23 | 'Access-Control'24 | 'Access-Control-Allow-Credentials'25 | 'Access-Control-Allow-Headers'26 | 'Access-Control-Allow-Methods'27 | 'Access-Control-Allow-Origin'28 | 'Access-Control-Expose-Headers'29 | 'Access-Control-Max-Age'30 | 'Access-Control-Request-Headers'31 | 'Access-Control-Request-Method'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 32why, one step back32 | 'Activate-Storage-Access'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 33–50why, one step back33 | 'Age'34 | 'Allow'35 | 'ALPN'36 | 'Alt-Svc'37 | 'Alt-Used'38 | 'Alternates'39 | 'AMP-Cache-Transform'40 | 'Apply-To-Redirect-Ref'41 | 'Authentication-Control'42 | 'Authentication-Info'43 | 'Authorization'44 | 'Available-Dictionary'45 | 'C-Ext'46 | 'C-Man'47 | 'C-Opt'48 | 'C-PEP'49 | 'C-PEP-Info'50 | 'Cache-Control'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
lines 51–52why, one step back51 | 'Cache-Group-Invalidation'52 | 'Cache-Groups'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 53–106why, one step back53 | 'Cache-Status'54 | 'Cal-Managed-ID'55 | 'CalDAV-Timezones'56 | 'Capsule-Protocol'57 | 'CDN-Cache-Control'58 | 'CDN-Loop'59 | 'Cert-Not-After'60 | 'Cert-Not-Before'61 | 'Clear-Site-Data'62 | 'Client-Cert'63 | 'Client-Cert-Chain'64 | 'Close'65 | 'CMCD-Object'66 | 'CMCD-Request'67 | 'CMCD-Session'68 | 'CMCD-Status'69 | 'CMSD-Dynamic'70 | 'CMSD-Static'71 | 'Concealed-Auth-Export'72 | 'Configuration-Context'73 | 'Connection'74 | 'Content-Base'75 | 'Content-Digest'76 | 'Content-Disposition'77 | 'Content-Encoding'78 | 'Content-ID'79 | 'Content-Language'80 | 'Content-Length'81 | 'Content-Location'82 | 'Content-MD5'83 | 'Content-Range'84 | 'Content-Script-Type'85 | 'Content-Security-Policy'86 | 'Content-Security-Policy-Report-Only'87 | 'Content-Style-Type'88 | 'Content-Type'89 | 'Content-Version'90 | 'Cookie'91 | 'Cookie2'92 | 'Cross-Origin-Embedder-Policy'93 | 'Cross-Origin-Embedder-Policy-Report-Only'94 | 'Cross-Origin-Opener-Policy'95 | 'Cross-Origin-Opener-Policy-Report-Only'96 | 'Cross-Origin-Resource-Policy'97 | 'CTA-Common-Access-Token'98 | 'DASL'99 | 'Date'100 | 'DAV'101 | 'Default-Style'102 | 'Delta-Base'103 | 'Deprecation'104 | 'Depth'105 | 'Derived-From'106 | 'Destination'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 107why, one step back107 | 'Detached-JWS'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 108–134why, one step back108 | 'Differential-ID'109 | 'Dictionary-ID'110 | 'Digest'111 | 'DPoP'112 | 'DPoP-Nonce'113 | 'Early-Data'114 | 'EDIINT-Features'115 | 'ETag'116 | 'Expect'117 | 'Expect-CT'118 | 'Expires'119 | 'Ext'120 | 'Forwarded'121 | 'From'122 | 'GetProfile'123 | 'Hobareg'124 | 'Host'125 | 'HTTP2-Settings'126 | 'If'127 | 'If-Match'128 | 'If-Modified-Since'129 | 'If-None-Match'130 | 'If-Range'131 | 'If-Schedule-Tag-Match'132 | 'If-Unmodified-Since'133 | 'IM'134 | 'Include-Referred-Token-Binding-ID'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 135why, one step back135 | 'Incremental'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 136–208why, one step back136 | 'Isolation'137 | 'Keep-Alive'138 | 'Label'139 | 'Last-Event-ID'140 | 'Last-Modified'141 | 'Link'142 | 'Link-Template'143 | 'Location'144 | 'Lock-Token'145 | 'Man'146 | 'Max-Forwards'147 | 'Memento-Datetime'148 | 'Meter'149 | 'Method-Check'150 | 'Method-Check-Expires'151 | 'MIME-Version'152 | 'Negotiate'153 | 'NEL'154 | 'OData-EntityId'155 | 'OData-Isolation'156 | 'OData-MaxVersion'157 | 'OData-Version'158 | 'Opt'159 | 'Optional-WWW-Authenticate'160 | 'Ordering-Type'161 | 'Origin'162 | 'Origin-Agent-Cluster'163 | 'OSCORE'164 | 'OSLC-Core-Version'165 | 'Overwrite'166 | 'P3P'167 | 'PEP'168 | 'PEP-Info'169 | 'Permissions-Policy'170 | 'PICS-Label'171 | 'Ping-From'172 | 'Ping-To'173 | 'Position'174 | 'Pragma'175 | 'Prefer'176 | 'Preference-Applied'177 | 'Priority'178 | 'ProfileObject'179 | 'Protocol'180 | 'Protocol-Info'181 | 'Protocol-Query'182 | 'Protocol-Request'183 | 'Proxy-Authenticate'184 | 'Proxy-Authentication-Info'185 | 'Proxy-Authorization'186 | 'Proxy-Features'187 | 'Proxy-Instruction'188 | 'Proxy-Status'189 | 'Public'190 | 'Public-Key-Pins'191 | 'Public-Key-Pins-Report-Only'192 | 'Range'193 | 'Redirect-Ref'194 | 'Referer'195 | 'Referer-Root'196 | 'Referrer-Policy'197 | 'Refresh'198 | 'Repeatability-Client-ID'199 | 'Repeatability-First-Sent'200 | 'Repeatability-Request-ID'201 | 'Repeatability-Result'202 | 'Replay-Nonce'203 | 'Reporting-Endpoints'204 | 'Repr-Digest'205 | 'Retry-After'206 | 'Safe'207 | 'Schedule-Reply'208 | 'Schedule-Tag'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
lines 209–213why, one step back209 | 'Sec-Fetch-Dest'210 | 'Sec-Fetch-Mode'211 | 'Sec-Fetch-Site'212 | 'Sec-Fetch-Storage-Access'213 | 'Sec-Fetch-User'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 214–226why, one step back214 | 'Sec-GPC'215 | 'Sec-Purpose'216 | 'Sec-Token-Binding'217 | 'Sec-WebSocket-Accept'218 | 'Sec-WebSocket-Extensions'219 | 'Sec-WebSocket-Key'220 | 'Sec-WebSocket-Protocol'221 | 'Sec-WebSocket-Version'222 | 'Security-Scheme'223 | 'Server'224 | 'Server-Timing'225 | 'Set-Cookie'226 | 'Set-Cookie2'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 227why, one step back227 | 'Set-Txn'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 228–247why, one step back228 | 'SetProfile'229 | 'Signature'230 | 'Signature-Input'231 | 'SLUG'232 | 'SoapAction'233 | 'Status-URI'234 | 'Strict-Transport-Security'235 | 'Sunset'236 | 'Surrogate-Capability'237 | 'Surrogate-Control'238 | 'TCN'239 | 'TE'240 | 'Timeout'241 | 'Timing-Allow-Origin'242 | 'Topic'243 | 'Traceparent'244 | 'Tracestate'245 | 'Trailer'246 | 'Transfer-Encoding'247 | 'TTL'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 248why, one step back248 | 'Unencoded-Digest'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 249–259why, one step back249 | 'Upgrade'250 | 'Urgency'251 | 'URI'252 | 'Use-As-Dictionary'253 | 'User-Agent'254 | 'Variant-Vary'255 | 'Vary'256 | 'Via'257 | 'Want-Content-Digest'258 | 'Want-Digest'259 | 'Want-Repr-Digest'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 260why, one step back260 | 'Want-Unencoded-Digest'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 261–266why, one step back261 | 'Warning'262 | 'WWW-Authenticate'263 | 'X-Content-Type-Options'264 | 'X-Frame-Options'265266export type ResponseHeader =Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 267why, one step back267 | 'Accept-Query'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 268–273why, one step back268 | 'Access-Control-Allow-Credentials'269 | 'Access-Control-Allow-Headers'270 | 'Access-Control-Allow-Methods'271 | 'Access-Control-Allow-Origin'272 | 'Access-Control-Expose-Headers'273 | 'Access-Control-Max-Age'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 274why, one step back274 | 'Activate-Storage-Access'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 275–277why, one step back275 | 'Age'276 | 'Allow'277 | 'Cache-Control'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
lines 278–279why, one step back278 | 'Cache-Group-Invalidation'279 | 'Cache-Groups'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 280–296why, one step back280 | 'Clear-Site-Data'281 | 'Content-Disposition'282 | 'Content-Encoding'283 | 'Content-Language'284 | 'Content-Length'285 | 'Content-Location'286 | 'Content-Range'287 | 'Content-Security-Policy'288 | 'Content-Security-Policy-Report-Only'289 | 'Content-Type'290 | 'Cookie'291 | 'Cross-Origin-Embedder-Policy'292 | 'Cross-Origin-Opener-Policy'293 | 'Cross-Origin-Resource-Policy'294 | 'Date'295 | 'ETag'296 | 'Expires'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 297why, one step back297 | 'Incremental'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 298–325why, one step back298 | 'Last-Modified'299 | 'Location'300 | 'Permissions-Policy'301 | 'Pragma'302 | 'Retry-After'303 | 'Save-Data'304 | 'Sec-CH-Prefers-Color-Scheme'305 | 'Sec-CH-Prefers-Reduced-Motion'306 | 'Sec-CH-UA'307 | 'Sec-CH-UA-Arch'308 | 'Sec-CH-UA-Bitness'309 | 'Sec-CH-UA-Form-Factor'310 | 'Sec-CH-UA-Full-Version'311 | 'Sec-CH-UA-Full-Version-List'312 | 'Sec-CH-UA-Mobile'313 | 'Sec-CH-UA-Model'314 | 'Sec-CH-UA-Platform'315 | 'Sec-CH-UA-Platform-Version'316 | 'Sec-CH-UA-WoW64'317 | 'Sec-Fetch-Dest'318 | 'Sec-Fetch-Mode'319 | 'Sec-Fetch-Site'320 | 'Sec-Fetch-User'321 | 'Sec-GPC'322 | 'Server'323 | 'Server-Timing'324 | 'Service-Worker-Navigation-Preload'325 | 'Set-Cookie'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 326why, one step back326 | 'Set-Txn'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 327–330why, one step back327 | 'Strict-Transport-Security'328 | 'Timing-Allow-Origin'329 | 'Trailer'330 | 'Transfer-Encoding'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 331why, one step back331 | 'Unencoded-Digest'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 332–333why, one step back332 | 'Upgrade'333 | 'Vary'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 334why, one step back334 | 'Want-Unencoded-Digest'Merge commit from forkYusuke Wadabefore adoptionf0b094d
line 335why, one step back335 | 'Warning'Merge pull request #5154 from honojs/nextYusuke Wadabefore adoptionb0c2d90
line 336why, one step back336 | 'WWW-Authenticate'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 337–355why, one step back337 | 'X-Content-Type-Options'338 | 'X-DNS-Prefetch-Control'339 | 'X-Frame-Options'340 | 'X-Permitted-Cross-Domain-Policies'341 | 'X-Powered-By'342 | 'X-Robots-Tag'343 | 'X-XSS-Protection'344345export type AcceptHeader =346 | 'Accept'347 | 'Accept-Charset'348 | 'Accept-Encoding'349 | 'Accept-Language'350 | 'Accept-Patch'351 | 'Accept-Post'352 | 'Accept-Ranges'353354// note: `X-${string}` is deprecated355export type CustomHeader = string & {}