quant function, filter, auth, functions
The Content CLI ships four related commands for managing edge code on QuantCDN: three for deploying individual edge functions (function, filter, auth) and one for deploying multiple at once from a config file (functions).
For an overview of what edge functions are and when to use them, see the Edge Functions docs.
| Command | Use when |
|---|---|
quant function |
Deploying a single edge function. |
quant filter |
Deploying a single edge filter function (modifies requests/responses). |
quant auth |
Deploying a single edge auth function (authentication/authorisation logic). |
quant functions |
Deploying many functions in one go from a JSON manifest. |
Each individual deploy command accepts an optional uuid positional. Pass it to update an existing function in place; omit it to deploy a new function.
quant function
Section titled “quant function”Deploy a single edge function.
Synopsis
Section titled “Synopsis”quant function <file> <description> [uuid] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
file |
Path to the function file (required). |
description |
Human-readable description of the function (required). |
uuid |
UUID of an existing function to update. Omit to deploy a new one. |
Examples
Section titled “Examples”# Deploy a new edge functionquant function handler.js "Homepage personalisation"
# Update an existing function by UUIDquant function handler.js "Homepage personalisation v2" 019361ae-2516-788a-8f50-e803ff561c34quant filter
Section titled “quant filter”Deploy a single edge filter function. Filter functions run on the request/response path and can modify headers, rewrite URLs, or short-circuit responses.
Synopsis
Section titled “Synopsis”quant filter <file> <description> [uuid] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
file |
Path to the filter function file (required). |
description |
Human-readable description (required). |
uuid |
UUID of an existing filter to update. |
Examples
Section titled “Examples”# New filterquant filter filter.js "Strip tracking params"
# Update existing filterquant filter filter.js "Strip tracking params v2" 019361ae-2516-788a-8f50-e803ff561c34quant auth
Section titled “quant auth”Deploy a single edge auth function. Auth functions evaluate requests and decide whether they should be allowed through to origin.
Synopsis
Section titled “Synopsis”quant auth <file> <description> [uuid] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
file |
Path to the auth function file (required). |
description |
Human-readable description (required). |
uuid |
UUID of an existing auth function to update. |
Examples
Section titled “Examples”# New auth functionquant auth auth.js "JWT gate for /admin"
# Update existing auth functionquant auth auth.js "JWT gate v2" 019361ae-2516-788a-8f50-e803ff561c34quant functions (bulk)
Section titled “quant functions (bulk)”Deploy multiple functions in a single command using a JSON manifest. Useful in CI when several functions ship together.
Synopsis
Section titled “Synopsis”quant functions <file> [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
file |
Path to the JSON manifest describing the functions to deploy (required). |
Examples
Section titled “Examples”quant functions functions.jsonManifest format
Section titled “Manifest format”The manifest is a JSON array. Each entry requires type (function, filter, or auth), path (the source file), and description; uuid is optional and updates an existing function instead of creating a new one:
[ { "type": "function", "path": "./functions/handler.js", "description": "Homepage personalisation" }, { "type": "filter", "path": "./functions/filter.js", "description": "Strip tracking params", "uuid": "019361ae-2516-788a-8f50-e803ff561c34" }]See also
Section titled “See also”- Edge Functions — concepts and capabilities.
quant waflogs— inspect WAF events triggered by edge code.
