@d1g1tal/transportr 1.4.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,277 +0,0 @@
1
- /**
2
- * Defining a constant object with the name HttpRequestMethod.
3
- *
4
- * @module HttpRequestMethod
5
- * @constant {Object<string, string>}
6
- */
7
- const HttpRequestMethod = {
8
- /**
9
- * The OPTIONS method represents a request for information about the communication options available on the
10
- * request/response chain identified by the Request-URI. This method allows the client to determine the options and/or
11
- * requirements associated with a resource, or the capabilities of a server, without implying a resource action or
12
- * initiating a resource retrieval.
13
- *
14
- * Responses to this method are not cacheable.
15
- *
16
- * If the OPTIONS request includes an entity-body (as indicated by the presence of Content-Length or
17
- * Transfer-Encoding), then the media type MUST be indicated by a Content-Type field. Although this specification does
18
- * not define any use for such a body, future extensions to HTTP might use the OPTIONS body to make more detailed
19
- * queries on the server. A server that does not support such an extension MAY discard the request body.
20
- *
21
- * If the Request-URI is an asterisk ("*"), the OPTIONS request is intended to apply to the server in general rather
22
- * than to a specific resource. Since a server's communication options typically depend on the resource, the "*"
23
- * request is only useful as a "ping" or "no-op" type of method, it does nothing beyond allowing the client to test the
24
- * capabilities of the server. For example, this can be used to test a proxy for HTTP/1.1 compliance (or lack thereof).
25
- *
26
- * If the Request-URI is not an asterisk, the OPTIONS request applies only to the options that are available when
27
- * communicating with that resource.
28
- *
29
- * A 200 response SHOULD include any header fields that indicate optional features implemented by the server and
30
- * applicable to that resource (e.g., Allow), possibly including extensions not defined by this specification. The
31
- * response body, if any, SHOULD also include information about the communication options. The format for such a body
32
- * is not defined by this specification, but might be defined by future extensions to HTTP. Content negotiation MAY be
33
- * used to select the appropriate response format. If no response body is included, the response MUST include a
34
- * Content-Length field with a field-value of "0".
35
- *
36
- * The Max-Forwards request-header field MAY be used to target a specific proxy in the request chain. When a proxy
37
- * receives an OPTIONS request on an absoluteURI for which request forwarding is permitted, the proxy MUST check for a
38
- * Max-Forwards field. If the Max-Forwards field-value is zero ("0"), the proxy MUST NOT forward the message, instead,
39
- * the proxy SHOULD respond with its own communication options. If the Max-Forwards field-value is an integer greater
40
- * than zero, the proxy MUST decrement the field-value when it forwards the request. If no Max-Forwards field is
41
- * present in the request, then the forwarded request MUST NOT include a Max-Forwards field.
42
- */
43
- OPTIONS: 'OPTIONS',
44
- /**
45
- * The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If
46
- * the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in
47
- * the response and not the source text of the process, unless that text happens to be the output of the process.
48
- *
49
- * The semantics of the GET method change to a "conditional GET" if the request message includes an If-Modified-Since;
50
- * If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. A conditional GET method requests that the
51
- * entity be transferred only under the circumstances described by the conditional header field(s). The conditional GET
52
- * method is intended to reduce unnecessary network usage by allowing cached entities to be refreshed without requiring
53
- * multiple requests or transferring data already held by the client.
54
- *
55
- * The semantics of the GET method change to a "partial GET" if the request message includes a Range header field. A
56
- * partial GET requests that only part of the entity be transferred, as described in section 14.35. The partial GET
57
- * method is intended to reduce unnecessary network usage by allowing partially-retrieved entities to be completed
58
- * without transferring data already held by the client.
59
- *
60
- * The response to a GET request is cacheable if and only if it meets the requirements for HTTP caching described in
61
- * section 13.
62
- *
63
- * See section 15.1.3 for security considerations when used for forms.
64
- */
65
- GET: 'GET',
66
- /**
67
- * The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The
68
- * meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information
69
- * sent in response to a GET request. This method can be used for obtaining meta information about the entity implied by
70
- * the request without transferring the entity-body itself. This method is often used for testing hypertext links for
71
- * validity, accessibility, and recent modification.
72
- *
73
- * The response to a HEAD request MAY be cacheable in the sense that the information contained in the response MAY be
74
- * used to update a previously cached entity from that resource. If the new field values indicate that the cached
75
- * entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or
76
- * Last-Modified), then the cache MUST treat the cache entry as stale.
77
- */
78
- HEAD: 'HEAD',
79
- /**
80
- * The POST method is used to request that the origin server accept the entity enclosed in the request as a new
81
- * subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform
82
- * method to cover the following functions:
83
- * <ul>
84
- * <li>Annotation of existing resources,</li>
85
- * <li>Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles,</li>
86
- * <li>Providing a block of data, such as the result of submitting a form, to a data-handling process,</li>
87
- * <li>Extending a database through an append operation.</li>
88
- * </ul>
89
- *
90
- * The actual function performed by the POST method is determined by the server and is usually dependent on the
91
- * Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory
92
- * containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a
93
- * database.
94
- *
95
- * The action performed by the POST method might not result in a resource that can be identified by a URI. In this
96
- * case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the
97
- * response includes an entity that describes the result.
98
- *
99
- * If a resource has been created on the origin server, the response SHOULD be 201 (Created) and contain an entity
100
- * which describes the status of the request and refers to the new resource, and a Location header (see section 14.30).
101
- *
102
- * Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header
103
- * fields. However, the 303 (See Other) response can be used to direct the user agent to retrieve a cacheable resource.
104
- *
105
- * POST requests MUST obey the message transmission requirements set out in section 8.2.
106
- *
107
- * See section 15.1.3 for security considerations.
108
- */
109
- POST: 'POST',
110
- /**
111
- * The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers
112
- * to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing
113
- * on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being
114
- * defined as a new resource by the requesting user agent, the origin server can create the resource with that URI. If
115
- * a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. If an
116
- * existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate
117
- * successful completion of the request. If the resource could not be created or modified with the Request-URI, an
118
- * appropriate error response SHOULD be given that reflects the nature of the problem. The recipient of the entity MUST
119
- * \NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a
120
- * 501 (Not Implemented) response in such cases.
121
- *
122
- * If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those
123
- * entries SHOULD be treated as stale. Responses to this method are not cacheable.
124
- *
125
- * The fundamental difference between the POST and PUT requests is reflected in the different meaning of the
126
- * Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. That resource
127
- * might be a data-accepting process, a gateway to some other protocol, or a separate entity that accepts annotations.
128
- * In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what
129
- * URI is intended and the server MUST NOT attempt to apply the request to some other resource. If the server desires
130
- * that the request be applied to a different URI, it MUST send a 301 (Moved Permanently) response, the user agent MAY
131
- * then make its own decision regarding whether or not to redirect the request.
132
- *
133
- * A single resource MAY be identified by many different URIs. For example, an article might have a URI for identifying
134
- * "the current version" which is separate from the URI identifying each particular version. In this case, a PUT
135
- * request on a general URI might result in several other URIs being defined by the origin server.
136
- *
137
- * HTTP/1.1 does not define how a PUT method affects the state of an origin server.
138
- *
139
- * PUT requests MUST obey the message transmission requirements set out in section 8.2.
140
- *
141
- * Unless otherwise specified for a particular entity-header, the entity-headers in the PUT request SHOULD be applied
142
- * to the resource created or modified by the PUT.
143
- */
144
- PUT: 'PUT',
145
- /**
146
- * The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY
147
- * be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the
148
- * operation has been carried out, even if the status code returned from the origin server indicates that the action
149
- * has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the response
150
- * is given, it intends to delete the resource or move it to an inaccessible location.
151
- *
152
- * A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if
153
- * the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not
154
- * include an entity.
155
- *
156
- * If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those
157
- * entries SHOULD be treated as stale. Responses to this method are not cacheable.
158
- */
159
- DELETE: 'DELETE',
160
- /**
161
- * The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final
162
- * recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK)
163
- * response. The final recipient is either the origin server or the first proxy or gateway to receive a Max-Forwards
164
- * value of zero (0) in the request (see section 14.31). A TRACE request MUST NOT include an entity.
165
- *
166
- * TRACE allows the client to see what is being received at the other end of the request chain and use that data for
167
- * testing or diagnostic information. The value of the Via header field (section 14.45) is of particular interest,
168
- * since it acts as a trace of the request chain. Use of the Max-Forwards header field allows the client to limit the
169
- * length of the request chain, which is useful for testing a chain of proxies forwarding messages in an infinite loop.
170
- *
171
- * If the request is valid, the response SHOULD contain the entire request message in the entity-body, with a
172
- * Content-Type of "message/http". Responses to this method MUST NOT be cached.
173
- */
174
- TRACE: 'TRACE',
175
- /**
176
- * This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a
177
- * tunnel (e.g. SSL tunneling [44]).
178
- */
179
- CONNECT: 'CONNECT',
180
- /**
181
- * The PATCH method requests that a set of changes described in the
182
- * request entity be applied to the resource identified by the Request-
183
- * URI. The set of changes is represented in a format called a "patch
184
- * document" identified by a media type. If the Request-URI does not
185
- * point to an existing resource, the server MAY create a new resource,
186
- * depending on the patch document type (whether it can logically modify
187
- * a null resource) and permissions, etc.
188
- *
189
- * The difference between the PUT and PATCH requests is reflected in the
190
- * way the server processes the enclosed entity to modify the resource
191
- * identified by the Request-URI. In a PUT request, the enclosed entity
192
- * is considered to be a modified version of the resource stored on the
193
- * origin server, and the client is requesting that the stored version
194
- * be replaced. With PATCH, however, the enclosed entity contains a set
195
- * of instructions describing how a resource currently residing on the
196
- * origin server should be modified to produce a new version. The PATCH
197
- * method affects the resource identified by the Request-URI, and it
198
- * also MAY have side effects on other resources; i.e., new resources
199
- * may be created, or existing ones modified, by the application of a
200
- * PATCH.
201
- *
202
- * PATCH is neither safe nor idempotent as defined by [RFC2616], Section
203
- * 9.1.
204
- *
205
- * A PATCH request can be issued in such a way as to be idempotent,
206
- * which also helps prevent bad outcomes from collisions between two
207
- * PATCH requests on the same resource in a similar time frame.
208
- * Collisions from multiple PATCH requests may be more dangerous than
209
- * PUT collisions because some patch formats need to operate from a
210
- * known base-point or else they will corrupt the resource. Clients
211
- * using this kind of patch application SHOULD use a conditional request
212
- * such that the request will fail if the resource has been updated
213
- * since the client last accessed the resource. For example, the client
214
- * can use a strong ETag [RFC2616] in an If-Match header on the PATCH
215
- * request.
216
- *
217
- * There are also cases where patch formats do not need to operate from
218
- * a known base-point (e.g., appending text lines to log files, or non-
219
- * colliding rows to database tables), in which case the same care in
220
- * client requests is not needed.
221
- *
222
- * The server MUST apply the entire set of changes atomically and never
223
- * provide (e.g., in response to a GET during this operation) a
224
- * partially modified representation. If the entire patch document
225
- * cannot be successfully applied, then the server MUST NOT apply any of
226
- * the changes. The determination of what constitutes a successful
227
- * PATCH can vary depending on the patch document and the type of
228
- * resource(s) being modified. For example, the common 'diff' utility
229
- * can generate a patch document that applies to multiple files in a
230
- * directory hierarchy. The atomicity requirement holds for all
231
- * directly affected files. See "Error Handling", Section 2.2, for
232
- * details on status codes and possible error conditions.
233
- *
234
- * If the request passes through a cache and the Request-URI identifies
235
- * one or more currently cached entities, those entries SHOULD be
236
- * treated as stale. A response to this method is only cacheable if it
237
- * contains explicit freshness information (such as an Expires header or
238
- * "Cache-Control: max-age" directive) as well as the Content-Location
239
- * header matching the Request-URI, indicating that the PATCH response
240
- * body is a resource representation. A cached PATCH response can only
241
- * be used to respond to subsequent GET and HEAD requests; it MUST NOT
242
- * be used to respond to other methods (in particular, PATCH).
243
- *
244
- * Note that entity-headers contained in the request apply only to the
245
- * contained patch document and MUST NOT be applied to the resource
246
- * being modified. Thus, a Content-Language header could be present on
247
- * the request, but it would only mean (for whatever that's worth) that
248
- * the patch document had a language. Servers SHOULD NOT store such
249
- * headers except as trace information, and SHOULD NOT use such header
250
- * values the same way they might be used on PUT requests. Therefore,
251
- * this document does not specify a way to modify a document's Content-
252
- * Type or Content-Language value through headers, though a mechanism
253
- * could well be designed to achieve this goal through a patch document.
254
- *
255
- * There is no guarantee that a resource can be modified with PATCH.
256
- * Further, it is expected that different patch document formats will be
257
- * appropriate for different types of resources and that no single
258
- * format will be appropriate for all types of resources. Therefore,
259
- * there is no single default patch document format that implementations
260
- * are required to support. Servers MUST ensure that a received patch
261
- * document is appropriate for the type of resource identified by the
262
- * Request-URI.
263
- *
264
- * Clients need to choose when to use PATCH rather than PUT. For
265
- * example, if the patch document size is larger than the size of the
266
- * new resource data that would be used in a PUT, then it might make
267
- * sense to use PUT instead of PATCH. A comparison to POST is even more
268
- * difficult, because POST is used in widely varying ways and can
269
- * encompass PUT and PATCH-like operations if the server chooses. If
270
- * the operation does not modify the resource identified by the Request-
271
- * URI in a predictable way, POST should be considered instead of PATCH
272
- * or PUT.
273
- */
274
- PATCH: 'PATCH'
275
- };
276
-
277
- export default HttpRequestMethod;
@@ -1,350 +0,0 @@
1
- /**
2
- * Defining a constant object with a bunch of properties.
3
- *
4
- * @module HttpResponseHeader
5
- * @constant {Object<string, string>}
6
- */
7
- const HttpResponseHeader = {
8
- /**
9
- * Implemented as a misunderstanding of the HTTP specifications. Common because of mistakes in implementations of early HTTP versions. Has exactly the same functionality as standard Connection field.
10
- *
11
- * @example
12
- * proxy-connection: keep-alive
13
- */
14
- PROXY_CONNECTION: 'proxy-connection',
15
- /**
16
- * Server-side deep packet insertion of a unique ID identifying customers of Verizon Wireless, also known as "perma-cookie" or "supercookie"
17
- *
18
- * @example
19
- * x-uidh: ...
20
- */
21
- X_UIDH: 'x-uidh',
22
- /**
23
- * Used to prevent cross-site request forgery. Alternative header names are: X-CSRFToken and X-XSRF-TOKEN
24
- *
25
- * @example
26
- * x-csrf-token: i8XNjC4b8KVok4uw5RftR38Wgp2BFwql
27
- */
28
- X_CSRF_TOKEN: 'x-csrf-token',
29
- /**
30
- * Specifying which web sites can participate in cross-origin resource sharing
31
- *
32
- * @example
33
- * access-control-allow-origin: *
34
- * Provisional
35
- */
36
- ACCESS_CONTROL_ALLOW_ORIGIN: 'access-control-allow-origin',
37
- /**
38
- * Specifies which patch document formats this server supports
39
- *
40
- * @example
41
- * accept-patch: text/example,charset=utf-8
42
- * Permanent
43
- */
44
- ACCEPT_PATCH: 'accept-patch',
45
- /**
46
- * What partial content range types this server supports via byte serving
47
- *
48
- * @example
49
- * accept-ranges: bytes
50
- * Permanent
51
- */
52
- ACCEPT_RANGES: 'accept-ranges',
53
- /**
54
- * The age the object has been in a proxy cache in seconds
55
- *
56
- * @example
57
- * age: 12
58
- * Permanent
59
- */
60
- AGE: 'age',
61
- /**
62
- * Valid actions for a specified resource. To be used for a 405 Method not allowed
63
- *
64
- * @example
65
- * allow: GET, HEAD
66
- * Permanent
67
- */
68
- ALLOW: 'allow',
69
- /**
70
- * Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds
71
- *
72
- * @example
73
- * cache-control: max-age=3600
74
- * Permanent
75
- */
76
- CACHE_CONTROL: 'cache-control',
77
- /**
78
- * Control options for the current connection and list of hop-by-hop response fields
79
- *
80
- * @example
81
- * connection: close
82
- * Permanent
83
- */
84
- CONNECTION: 'connection',
85
- /**
86
- * An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.
87
- *
88
- * @example
89
- * content-disposition: attachment, filename="fname.ext"
90
- * Permanent
91
- */
92
- CONTENT_DISPOSITION: 'content-disposition',
93
- /**
94
- * The type of encoding used on the data. See HTTP compression.
95
- *
96
- * @example
97
- * content-encoding: gzip
98
- * Permanent
99
- */
100
- CONTENT_ENCODING: 'content-encoding',
101
- /**
102
- * The natural language or languages of the intended audience for the enclosed content
103
- *
104
- * @example
105
- * content-language: da
106
- * Permanent
107
- */
108
- CONTENT_LANGUAGE: 'content-language',
109
- /**
110
- * The length of the response body in octets (8-bit bytes)
111
- *
112
- * @example
113
- * content-length: 348
114
- * Permanent
115
- */
116
- CONTENT_LENGTH: 'content-length',
117
- /**
118
- * An alternate location for the returned data
119
- *
120
- * @example
121
- * content-location: /index.htm
122
- * Permanent
123
- */
124
- CONTENT_LOCATION: 'content-location',
125
- /**
126
- * Where in a full body message this partial message belongs
127
- *
128
- * @example
129
- * content-range: bytes 21010-47021/47022
130
- * Permanent
131
- */
132
- CONTENT_RANGE: 'content-range',
133
- /**
134
- * The MIME type of this content
135
- *
136
- * @example
137
- * content-type: text/html, charset=utf-8
138
- * Permanent
139
- */
140
- CONTENT_TYPE: 'content-type',
141
- /**
142
- * The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231)
143
- *
144
- * @example
145
- * date: Tue, 15 Nov 1994 08:12:31 GMT
146
- * Permanent
147
- */
148
- DATE: 'date',
149
- /**
150
- * An identifier for a specific version of a resource, often a message digest
151
- *
152
- * @example
153
- * etag: "737060cd8c284d8af7ad3082f209582d"
154
- * Permanent
155
- */
156
- ETAG: 'etag',
157
- /**
158
- * Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231)
159
- *
160
- * @example
161
- * expires: Thu, 01 Dec 1994 16:00:00 GMT
162
- * Permanent
163
- */
164
- EXPIRES: 'expires',
165
- /**
166
- * The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231)
167
- *
168
- * @example
169
- * last-modified: Tue, 15 Nov 1994 12:45:26 GMT
170
- * Permanent
171
- */
172
- LAST_MODIFIED: 'last-modified',
173
- /**
174
- * Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988
175
- *
176
- * @example
177
- * link: </feed>, rel="alternate"
178
- * Permanent
179
- */
180
- LINK: 'link',
181
- /**
182
- * Used in redirection, or when a new resource has been created.
183
- *
184
- * @example
185
- * location: http://www.w3.org/pub/WWW/People.html
186
- * Permanent
187
- */
188
- LOCATION: 'location',
189
- /**
190
- * This field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy". However, P3P did not take off, most browsers have never fully
191
- * implemented it, a lot of websites set this field with fake policy text, that was enough to fool browsers the existence of P3P policy and grant permissions for third party cookies.
192
- *
193
- * @example
194
- * p3p: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
195
- * Permanent
196
- */
197
- P3P: 'p3p',
198
- /**
199
- * Implementation-specific fields that may have various effects anywhere along the request-response chain.
200
- *
201
- * @example
202
- * pragma: no-cache
203
- * Permanent
204
- */
205
- PRAGMA: 'pragma',
206
- /**
207
- * Request authentication to access the proxy.
208
- *
209
- * @example
210
- * proxy-authenticate: Basic
211
- * Permanent
212
- */
213
- PROXY_AUTHENTICATION: 'proxy-authenticate',
214
- /**
215
- * HTTP Public Key Pinning, announces hash of website's authentic TLS certificate
216
- *
217
- * @example
218
- * public-key-pins: max-age=2592000, pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=",
219
- * Permanent
220
- */
221
- PUBLIC_KEY_PINS: 'public-key-pins',
222
- /**
223
- * If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.
224
- *
225
- * @example
226
- * retry-after: 120
227
- * retry-after: Fri, 07 Nov 2014 23:59:59 GMT
228
- * Permanent
229
- */
230
- RETRY_AFTER: 'retry-after',
231
- /**
232
- * A name for the server
233
- *
234
- * @example
235
- * server: Apache/2.4.1 (Unix)
236
- * Permanent
237
- */
238
- SERVER: 'server',
239
- /**
240
- * An HTTP cookie
241
- *
242
- * @example
243
- * set-cookie: UserID=JohnDoe, Max-Age=3600, Version=1
244
- * Permanent
245
- */
246
- SET_COOKIE: 'set-cookie',
247
- /**
248
- * CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230.
249
- *
250
- * @example
251
- * status: 200 OK
252
- */
253
- STATUS: 'status',
254
- /**
255
- * A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
256
- *
257
- * @example
258
- * strict-transport-security: max-age=16070400, includeSubDomains
259
- * Permanent
260
- */
261
- STRICT_TRANSPORT_SECURITY: 'strict-transport-security',
262
- /**
263
- * The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.
264
- *
265
- * @example
266
- * trailer: Max-Forwards
267
- * Permanent
268
- */
269
- TRAILER: 'trailer',
270
- /**
271
- * The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
272
- *
273
- * @example
274
- * transfer-encoding: chunked
275
- * Permanent
276
- */
277
- TRANSFER_ENCODING: 'transfer-encoding',
278
- /**
279
- * Ask the client to upgrade to another protocol.
280
- *
281
- * @example
282
- * upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
283
- * Permanent
284
- */
285
- UPGRADE: 'upgrade',
286
- /**
287
- * Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.
288
- *
289
- * @example
290
- * vary: *
291
- * Permanent
292
- */
293
- VARY: 'vary',
294
- /**
295
- * Informs the client of proxies through which the response was sent.
296
- *
297
- * @example
298
- * via: 1.0 fred, 1.1 example.com (Apache/1.1)
299
- * Permanent
300
- */
301
- VIA: 'via',
302
- /**
303
- * A general warning about possible problems with the entity body.
304
- *
305
- * @example
306
- * warning: 199 Miscellaneous warning
307
- * Permanent
308
- */
309
- WARNING: 'warning',
310
- /**
311
- * Indicates the authentication scheme that should be used to access the requested entity.
312
- *
313
- * @example
314
- * www-authenticate: Basic
315
- * Permanent
316
- */
317
- WWW_AUTHENTICATE: 'www-authenticate',
318
- /**
319
- * Cross-site scripting (XSS) filter
320
- *
321
- * @example
322
- * x-xss-protection: 1, mode=block
323
- */
324
- X_XSS_PROTECTION: 'x-xss-protection',
325
- /**
326
- * The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed
327
- * to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.
328
- * This helps guard against cross-site scripting attacks (Cross-site_scripting).
329
- *
330
- * @example
331
- * content-security-policy: default-src
332
- */
333
- CONTENT_SECURITY_POLICY: 'content-security-policy',
334
- /**
335
- * The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions.
336
- *
337
- * @example
338
- * x-content-type-options: nosniff
339
- */
340
- X_CONTENT_TYPE_OPTIONS: 'x-content-type-options',
341
- /**
342
- * specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)
343
- *
344
- * @example
345
- * x-powered-by: PHP/5.4.0
346
- */
347
- X_POWERED_BY: 'x-powered-by'
348
- };
349
-
350
- export default HttpResponseHeader;