Skip to main content

Fastly

Fastly is a developer-focused CDN with strong VCL-based config and instant purge. Use it on top of Filebase when you want VCL-level edge logic that the built-in Filebase CDN doesn't expose.

Configure a Fastly service

  1. In the Fastly UI, Create new service.
  2. Set up the Origin:
FieldValue
NameFilebase
Address<bucket-name>.s3.filebase.io
Port443
Use TLS
Override host<bucket-name>.s3.filebase.io
Shielding(optional, pick a region near your origin)
  1. Configure your custom domain and TLS certificate.
  2. Activate the service.

VCL example: SPA index fallback

sub vcl_recv {
# If the request is for a path with no file extension, serve index.html
if (req.url.path !~ "\.\w+$" && req.url.path != "/") {
set req.url = "/index.html";
}
}

Purging

Fastly's instant purge invalidates cached responses globally in under 150 ms. After uploading a new version of an object to Filebase:

curl -X PURGE -H "Fastly-Key: $FASTLY_TOKEN" \
https://your-domain.com/path/to/object.css

When to use Fastly + Filebase

  • You want VCL-level edge logic.
  • You want fine-grained purging.
  • You're already a Fastly customer.

For most simple static-asset workflows, just use the built-in Filebase CDN — it's free, automatic, and adequate.

What's next