The following headers are not accessible within a Function. Avoid developing any code that depends on these headers or their variants.
Header Name |
---|
Connection Proxy-Connection |
Expect |
Host |
Proxy-Authorization Proxy-Authenticate |
Referer |
Trailer |
Transfer-Encoding |
Upgrade |
Via |
X-Accel-* |
X-Forwarded-* X-Real-IP |
You cannot interact with the pre-flight OPTIONS request that is sent by browsers. The Runtime client will automatically respond to OPTIONS
requests with Access-Control-Allow-Headers: *
, and pass along all included request headers to the targeted Function (unless they are in the exclusions list above). In addition, the Runtime client allows all origins by returning Access-Control-Allow-Origin: *
.
Headers and cookies in both incoming requests and outgoing responses are subject to these limits:
If either of these limits is exceeded, your Function will throw a 431
error. The error will include the message Request headers or cookies too long
if the limits are exceeded by a request, or Response headers or cookies too long
if you've constructed a response that exceeds these limits.
This will also generate a Twilio Error 82008.