Make sure that you have the fastly cli installed and configured with the fastly token.
To serve it locally, run
fastly compute serve
or to deploy it, run
fastly compute build
fastly compute deploy
You can remove or update the service_id
in fastly.toml
if you wish to deploy it to a different C@E service
The --nocapture
flag shows the println!()
outputs in the test results.
cargo test -- --nocapture
The URL transformation rule handles redirects and rewrites defined by the user. These configs are stored in the fastly KV store.
The rules structure has two parts, simple_rules
and regexes
A rule is a redirect if it has a permanent
field value. Otherwise, it is a rewrite.
Inside fastly.toml the local-server block has been modified to include a mock KV that serves redirects from local
cargo fmt --all
Logs are sent to an opensearch collection within the thgvega stack in eu-west-1. They can be viewed via the aws dashboard.