Configuration
Mocktioneer is configured through edgezero.toml, which is compiled into every adapter binary. This manifest-driven approach ensures consistent behavior across all platforms.
Configuration File
The edgezero.toml file lives at the root of the mocktioneer workspace:
[app]
name = "mocktioneer"
entry = "crates/mocktioneer-core"
middleware = [
"edgezero_core::middleware::RequestLogger",
"mocktioneer_core::routes::Cors"
]App Section
The [app] section defines the core application:
| Field | Description |
|---|---|
name | Application identifier |
entry | Path to the core crate |
middleware | List of middleware to apply to all routes |
HTTP Triggers
Routes are defined as [[triggers.http]] blocks:
[[triggers.http]]
id = "openrtb_auction"
path = "/openrtb2/auction"
methods = ["POST"]
handler = "mocktioneer_core::routes::handle_openrtb_auction"
adapters = ["axum", "cloudflare", "fastly"]| Field | Description |
|---|---|
id | Unique route identifier |
path | URL path (supports {param} placeholders) |
methods | HTTP methods to accept |
handler | Rust function path |
adapters | Which adapters support this route |
Available Routes
| Path | Methods | Handler | Description |
|---|---|---|---|
/ | GET | handle_root | Service info page |
/openrtb2/auction | POST | handle_openrtb_auction | OpenRTB 2.x bid request |
/e/dtb/bid | POST | handle_aps_bid | APS TAM bid request |
/static/img/{size} | GET | handle_static_img | SVG creative image |
/static/creatives/{size} | GET | handle_static_creatives | HTML creative wrapper |
/click | GET | handle_click | Click landing page |
/pixel | GET | handle_pixel | Tracking pixel |
/aps/win | GET | handle_aps_win | APS win notification |
/adserver/mediate | POST | handle_adserver_mediate | Auction mediation |
/_/sizes | GET | handle_sizes | Supported sizes as JSON |
/sync/start | GET | handle_sync_start | EC pixel sync initiation |
/sync/done | GET | handle_sync_done | EC pixel sync callback |
/resolve | GET | handle_resolve | EC pull sync resolution |
All routes also have OPTIONS handlers for CORS preflight.
Adapter Configuration
Each adapter has its own configuration section:
Axum Adapter
[adapters.axum.adapter]
crate = "crates/mocktioneer-adapter-axum"
manifest = "crates/mocktioneer-adapter-axum/axum.toml"
[adapters.axum.build]
target = "native"
profile = "dev"
[adapters.axum.commands]
build = "cargo build -p mocktioneer-adapter-axum"
serve = "cargo run -p mocktioneer-adapter-axum"
deploy = "# configure deployment for Axum"
[adapters.axum.logging]
level = "info"
echo_stdout = trueFastly Adapter
[adapters.fastly.adapter]
crate = "crates/mocktioneer-adapter-fastly"
manifest = "crates/mocktioneer-adapter-fastly/fastly.toml"
[adapters.fastly.build]
target = "wasm32-wasip1"
profile = "release"
features = ["fastly"]
[adapters.fastly.commands]
build = "cargo build --release --target wasm32-wasip1 -p mocktioneer-adapter-fastly"
serve = "fastly compute serve -C crates/mocktioneer-adapter-fastly"
deploy = "fastly compute deploy -C crates/mocktioneer-adapter-fastly"
[adapters.fastly.logging]
endpoint = "mocktioneerlog"
level = "info"
echo_stdout = falseCloudflare Adapter
[adapters.cloudflare.adapter]
crate = "crates/mocktioneer-adapter-cloudflare"
manifest = "crates/mocktioneer-adapter-cloudflare/wrangler.toml"
[adapters.cloudflare.build]
target = "wasm32-unknown-unknown"
profile = "release"
features = ["cloudflare"]
[adapters.cloudflare.commands]
build = "cargo build --release --target wasm32-unknown-unknown -p mocktioneer-adapter-cloudflare"
serve = "wrangler dev --config crates/mocktioneer-adapter-cloudflare/wrangler.toml"
deploy = "wrangler publish --config crates/mocktioneer-adapter-cloudflare/wrangler.toml"
[adapters.cloudflare.logging]
level = "info"
echo_stdout = trueLogging Configuration
| Field | Description |
|---|---|
endpoint | Log endpoint name (Fastly-specific) |
level | Log level: trace, debug, info, warn, error |
echo_stdout | Whether to print logs to stdout |
Environment Variables
Mocktioneer reads these optional environment variables at runtime for Edge Cookie sync configuration:
| Variable | Description | Default |
|---|---|---|
MOCKTIONEER_TS_DOMAINS | Comma-separated allowlist of trusted-server hostnames for /sync/start | Unset (all syntactically valid domains allowed; demo/dev mode) |
MOCKTIONEER_PULL_TOKEN | Bearer token required for /resolve authentication | Unset (auth disabled); empty values fail closed |
# Example: restrict sync to specific trusted-server instances
export MOCKTIONEER_TS_DOMAINS="ts.publisher.com,ts.staging.publisher.com"
export MOCKTIONEER_PULL_TOKEN="<YOUR_PULL_TOKEN>"Production Security
Set both MOCKTIONEER_TS_DOMAINS and a non-empty MOCKTIONEER_PULL_TOKEN for production-style deployments. On Cloudflare Workers, these values are currently read with std::env::var, so wrangler.toml bindings are not enforced by this core code path.
See the Trusted Server integration guide for full setup details.
Rebuilding After Changes
Since edgezero.toml is embedded at compile time via include_str!, you must rebuild the adapter after making changes:
cargo build -p mocktioneer-adapter-axumEnvironment-Specific Configuration
For adapter-specific settings not covered by edgezero.toml:
- Axum: Edit
crates/mocktioneer-adapter-axum/axum.toml - Fastly: Edit
crates/mocktioneer-adapter-fastly/fastly.toml - Cloudflare: Edit
crates/mocktioneer-adapter-cloudflare/wrangler.toml