The Quant Terraform provider's first release, auth functions and live preview for edge functions, key-value stores in the dashboard, a bot challenge rule action, and a cache purge API.
A new cache purge endpoint in the v2 API, /v2/organizations/{org}/projects/{project}/purge, lets you clear cached content programmatically. You can purge by cache key and control the scope of the purge, so you target only the content you need to refresh. The scope sets whether a cache key purge clears the keys in this project only or, if your project supports it, in the whole organisation. The purge form in the dashboard has also been reworked to make it clearer what you select to purge.
New Edge functions
Auth functions
Auth functions are a new type of edge function that decides whether a request can proceed. Attach one to a rule with the new Edge auth action. The auth function then runs before content is served on matched paths. It either lets the request continue or returns its own response, such as a sign-in page. The function editor includes examples for Apple sign-in, Auth0 and basic authentication to adapt.
You can now run an edge function directly from the function editor in the dashboard and see its output in a preview pane before deploying. This lets you test changes to a function without first publishing it to your project.
New KV stores
Management in the dashboard
You can now create and delete key-value stores on your project's KV stores page in the dashboard. You can also add, edit, view and delete the items in each store there.
Edge functions can now read and write your project's key-value stores. Call kvStore.get(), kvStore.set() and kvStore.delete() with the store ID from the KV stores page, so a function can keep data between requests, such as short links or settings.
A new Bot challenge rule action asks visitors to complete a challenge before content is served on the paths the rule matches. You can choose a checkbox challenge or an invisible challenge that needs no interaction. You can set how long a visitor has to complete the challenge, from 30 seconds to 5 minutes. You can also set how long a passed challenge stays valid, from 1 minute to 24 hours. Combine it with any rule criteria, such as traffic source, to challenge only the requests you choose.
Rules can now match on where a request comes from. Set the traffic source criterion to "is one of" or "is not one of", and choose the sources. They are Tor exit nodes, Tor relay nodes, cloud computing services, web security cloud providers, DNS proxies, VPN services and web browser proxies. For example, you can apply stricter rules to traffic that does not come from ordinary visitors.
New Terraform
Provider now available
The first release of the official Quant Terraform provider (v0.0.1) is now available. Manage projects, header rules, proxy rules, and redirect rules as infrastructure-as-code with the quant_project, quant_header, quant_rule_proxy, and quant_rule_redirect resources, plus a quant_projects data source for listing the projects in your organisation. A quick-start guide is available in the documentation.
Near-live traffic charts, daily totals and a Year view
The hits and bandwidth charts on your project dashboard now update in close to real time. The Month view now shows a total for each of the last 30 days, and a new Year view shows monthly totals for the last 12 months.
Improved Edge functions
Caching for pages with inline functions
Pages that include inline function output can now be cached. If the function returns a Cache-Control header, the whole page, from static content or a proxied origin, uses that header. Without one, the page is still sent as private and is not cached.
Headless mode and default settings for new crawlers
When you created a crawler, the headless mode setting was not applied correctly, and some default crawler settings were inconsistent. These and other issues with creating and configuring crawlers are now resolved.