Creates a new Backend instance
Construct a new backend with all properties set to their default values:
const myBackend = new Backend({ name: 'fastly', target: 'www.fastly.com'});
Returns the name of the Backend, which can be used on backend
Generated using TypeDoc
Class for dynamically creating new Fastly Backends.
Note
This feature is in disabled by default for Fastly Services. Please contact Fastly Support to request the feature be enabled on the Fastly Services which require Dynamic Backends.
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.
To enable Dynamic Backends the application will need to explicitly allow Dynamic Backends via:
Note: Can only be used when processing requests, not during build-time initialization.
Example
In this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.
Example
In this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.