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
- In the Fastly UI, Create new service.
- Set up the Origin:
| Field | Value |
|---|---|
| Name | Filebase |
| Address | <bucket-name>.s3.filebase.io |
| Port | 443 |
| Use TLS | ✓ |
| Override host | <bucket-name>.s3.filebase.io |
| Shielding | (optional, pick a region near your origin) |
- Configure your custom domain and TLS certificate.
- 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.