Skip to main content
Version: 3.13.0


The allowDynamicBackends() function is used to control whether or not Dynamic Backends should be 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 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.




  • enabled : boolean
    • Whether or not to allow Dynamic Backends

Return value



In this example an implicit Dynamic Backend is created when making the fetch request to and the response is then returned to the client.

/// <reference types="@fastly/js-compute" />
import { allowDynamicBackends } from "fastly:experimental";
async function app() {
// For any request, return the fastly homepage -- without defining a backend!
return fetch('');
addEventListener("fetch", event => event.respondWith(app(event)));