allowDynamicBackends
Control whether or not Dynamic Backends are allowed within this Fastly Compute service.
By default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending, which could be a security issue.
Note: This feature is disabled by default for Fastly Services. Please contact Fastly Support to request the feature be enabled on the Fastly Services which require Dynamic Backends.
Overload 1 of 2
allowDynamicBackends(enabled: boolean): voidControl whether or not Dynamic Backends are allowed within this Fastly Compute service.
By default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending, which could be a security issue.
Note: This feature is disabled by default for Fastly Services. Please contact Fastly Support to request the feature be enabled on the Fastly Services which require Dynamic Backends.
Parameters
- enabled: boolean
Whether or not to allow Dynamic Backends.
Returns
Overload 2 of 2
allowDynamicBackends(defaultConfig: { connectTimeout?: number; firstByteTimeout?: number; betweenBytesTimeout?: number }): voidEnable Dynamic Backends with default timeout configuration.
Parameters
- defaultConfig: { connectTimeout?: number; firstByteTimeout?: number; betweenBytesTimeout?: number }
Default timeout configuration for dynamic backends.
connectTimeoutoptional:number— Maximum duration in milliseconds to wait for a connection to be established.firstByteTimeoutoptional:number— Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.betweenBytesTimeoutoptional:number— Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.
Returns
Throws
RangeErrorif any timeout value is negative or greater than or equal to 2^32.