1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+ // See the LICENSE file in the project root for more information.
4
+
5
+ internal static class Http
6
+ {
7
+ // from: https://github.com/jonluca/har-to-openapi/blob/0d44409162c0a127cdaccd60b0a270ecd361b829/src/utils/headers.ts
8
+ internal static readonly string [ ] StandardHeaders =
9
+ [
10
+ ":authority" ,
11
+ ":method" ,
12
+ ":path" ,
13
+ ":scheme" ,
14
+ ":status" ,
15
+ "a-im" ,
16
+ "accept" ,
17
+ "accept-additions" ,
18
+ "accept-ch" ,
19
+ "accept-ch-lifetime" ,
20
+ "accept-charset" ,
21
+ "accept-datetime" ,
22
+ "accept-encoding" ,
23
+ "accept-features" ,
24
+ "accept-language" ,
25
+ "accept-patch" ,
26
+ "accept-post" ,
27
+ "accept-ranges" ,
28
+ "access-control-allow-credentials" ,
29
+ "access-control-allow-headers" ,
30
+ "access-control-allow-methods" ,
31
+ "access-control-allow-origin" ,
32
+ "access-control-expose-headers" ,
33
+ "access-control-max-age" ,
34
+ "access-control-request-headers" ,
35
+ "access-control-request-method" ,
36
+ "age" ,
37
+ "allow" ,
38
+ "alpn" ,
39
+ "alt-svc" ,
40
+ "alternate-protocol" ,
41
+ "alternates" ,
42
+ "amp-access-control-allow-source-origin" ,
43
+ "apply-to-redirect-ref" ,
44
+ "authentication-info" ,
45
+ "authorization" ,
46
+ "c-ext" ,
47
+ "c-man" ,
48
+ "c-opt" ,
49
+ "c-pep" ,
50
+ "c-pep-info" ,
51
+ "cache-control" ,
52
+ "ch" ,
53
+ "connection" ,
54
+ "content-base" ,
55
+ "content-disposition" ,
56
+ "content-dpr" ,
57
+ "content-encoding" ,
58
+ "content-id" ,
59
+ "content-language" ,
60
+ "content-length" ,
61
+ "content-location" ,
62
+ "content-md5" ,
63
+ "content-range" ,
64
+ "content-script-type" ,
65
+ "content-security-policy" ,
66
+ "content-security-policy-report-only" ,
67
+ "content-style-type" ,
68
+ "content-type" ,
69
+ "content-version" ,
70
+ "cookie" ,
71
+ "cookie2" ,
72
+ "cross-origin-resource-policy" ,
73
+ "dasl" ,
74
+ "date" ,
75
+ "dav" ,
76
+ "default-style" ,
77
+ "delta-base" ,
78
+ "depth" ,
79
+ "derived-from" ,
80
+ "destination" ,
81
+ "differential-id" ,
82
+ "digest" ,
83
+ "dnt" ,
84
+ "dpr" ,
85
+ "encryption" ,
86
+ "encryption-key" ,
87
+ "etag" ,
88
+ "expect" ,
89
+ "expect-ct" ,
90
+ "expires" ,
91
+ "ext" ,
92
+ "forwarded" ,
93
+ "from" ,
94
+ "front-end-https" ,
95
+ "getprofile" ,
96
+ "host" ,
97
+ "http2-settings" ,
98
+ "if" ,
99
+ "if-match" ,
100
+ "if-modified-since" ,
101
+ "if-none-match" ,
102
+ "if-range" ,
103
+ "if-schedule-tag-match" ,
104
+ "if-unmodified-since" ,
105
+ "im" ,
106
+ "keep-alive" ,
107
+ "key" ,
108
+ "label" ,
109
+ "last-event-id" ,
110
+ "last-modified" ,
111
+ "link" ,
112
+ "link-template" ,
113
+ "location" ,
114
+ "lock-token" ,
115
+ "man" ,
116
+ "max-forwards" ,
117
+ "md" ,
118
+ "meter" ,
119
+ "mime-version" ,
120
+ "negotiate" ,
121
+ "nice" ,
122
+ "opt" ,
123
+ "ordering-type" ,
124
+ "origin" ,
125
+ "origin-trial" ,
126
+ "overwrite" ,
127
+ "p3p" ,
128
+ "pep" ,
129
+ "pep-info" ,
130
+ "pics-label" ,
131
+ "poe" ,
132
+ "poe-links" ,
133
+ "position" ,
134
+ "pragma" ,
135
+ "prefer" ,
136
+ "preference-applied" ,
137
+ "profileobject" ,
138
+ "protocol" ,
139
+ "protocol-info" ,
140
+ "protocol-query" ,
141
+ "protocol-request" ,
142
+ "proxy-authenticate" ,
143
+ "proxy-authentication-info" ,
144
+ "proxy-authorization" ,
145
+ "proxy-connection" ,
146
+ "proxy-features" ,
147
+ "proxy-instruction" ,
148
+ "public" ,
149
+ "range" ,
150
+ "redirect-ref" ,
151
+ "referer" ,
152
+ "referrer-policy" ,
153
+ "report-to" ,
154
+ "retry-after" ,
155
+ "rw" ,
156
+ "safe" ,
157
+ "save-data" ,
158
+ "schedule-reply" ,
159
+ "schedule-tag" ,
160
+ "sec-ch-ua" ,
161
+ "sec-ch-ua-mobile" ,
162
+ "sec-ch-ua-platform" ,
163
+ "sec-fetch-dest" ,
164
+ "sec-fetch-mode" ,
165
+ "sec-fetch-site" ,
166
+ "sec-fetch-user" ,
167
+ "sec-websocket-accept" ,
168
+ "sec-websocket-extensions" ,
169
+ "sec-websocket-key" ,
170
+ "sec-websocket-protocol" ,
171
+ "sec-websocket-version" ,
172
+ "security-scheme" ,
173
+ "server" ,
174
+ "server-timing" ,
175
+ "set-cookie" ,
176
+ "set-cookie2" ,
177
+ "setprofile" ,
178
+ "slug" ,
179
+ "soapaction" ,
180
+ "status-uri" ,
181
+ "strict-transport-security" ,
182
+ "sunset" ,
183
+ "surrogate-capability" ,
184
+ "surrogate-control" ,
185
+ "tcn" ,
186
+ "te" ,
187
+ "timeout" ,
188
+ "timing-allow-origin" ,
189
+ "tk" ,
190
+ "trailer" ,
191
+ "transfer-encoding" ,
192
+ "upgrade" ,
193
+ "upgrade-insecure-requests" ,
194
+ "uri" ,
195
+ "user-agent" ,
196
+ "variant-vary" ,
197
+ "vary" ,
198
+ "via" ,
199
+ "want-digest" ,
200
+ "warning" ,
201
+ "www-authenticate" ,
202
+ "x-att-deviceid" ,
203
+ "x-csrf-token" ,
204
+ "x-forwarded-for" ,
205
+ "x-forwarded-host" ,
206
+ "x-forwarded-proto" ,
207
+ "x-frame-options" ,
208
+ "x-frontend" ,
209
+ "x-http-method-override" ,
210
+ "x-powered-by" ,
211
+ "x-request-id" ,
212
+ "x-requested-with" ,
213
+ "x-uidh" ,
214
+ "x-wap-profile" ,
215
+ "x-xss-protection"
216
+ ] ;
217
+
218
+ internal static readonly string [ ] AuthHeaders =
219
+ [
220
+ "access-token" ,
221
+ "api-key" ,
222
+ "auth-token" ,
223
+ "authorization" ,
224
+ "authorization-token" ,
225
+ "cookie" ,
226
+ "key" ,
227
+ "token" ,
228
+ "x-access-token" ,
229
+ "x-access-token" ,
230
+ "x-api-key" ,
231
+ "x-auth" ,
232
+ "x-auth-token" ,
233
+ "x-csrf-token" ,
234
+ "secret" ,
235
+ "x-secret" ,
236
+ "access-key" ,
237
+ "api-key" ,
238
+ "apikey"
239
+ ] ;
240
+ }
0 commit comments