Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Trusted Server Environment Variables
# Copy this file to .env.dev, .env.staging, or .env.production and fill in values
# See docs/guide/configuration.md for details

# =============================================================================
# Publisher Settings
# =============================================================================
TRUSTED_SERVER__PUBLISHER__DOMAIN=publisher.com
TRUSTED_SERVER__PUBLISHER__COOKIE_DOMAIN=.publisher.com
TRUSTED_SERVER__PUBLISHER__ORIGIN_URL=https://origin.publisher.com
TRUSTED_SERVER__PUBLISHER__PROXY_SECRET=<your-proxy-secret>

# =============================================================================
# Synthetic ID Settings
# =============================================================================
TRUSTED_SERVER__SYNTHETIC__COUNTER_STORE=counter_store
TRUSTED_SERVER__SYNTHETIC__OPID_STORE=opid_store
TRUSTED_SERVER__SYNTHETIC__SECRET_KEY=<your-synthetic-secret>
# Template variables: client_ip, user_agent, first_party_id, auth_user_id, publisher_domain, accept_language
TRUSTED_SERVER__SYNTHETIC__TEMPLATE={{ client_ip }}:{{ user_agent }}:{{ first_party_id }}

# =============================================================================
# Request Signing (optional)
# =============================================================================
TRUSTED_SERVER__REQUEST_SIGNING__ENABLED=false
# TRUSTED_SERVER__REQUEST_SIGNING__CONFIG_STORE_ID=<fastly-config-store-id>
# TRUSTED_SERVER__REQUEST_SIGNING__SECRET_STORE_ID=<fastly-secret-store-id>

# =============================================================================
# Response Headers (optional)
# =============================================================================
# TRUSTED_SERVER__RESPONSE_HEADERS__X_CUSTOM_HEADER=custom-value

# =============================================================================
# Integrations
# =============================================================================

# Prebid
TRUSTED_SERVER__INTEGRATIONS__PREBID__ENABLED=false
# TRUSTED_SERVER__INTEGRATIONS__PREBID__SERVER_URL=https://prebid-server.com/openrtb2/auction
# TRUSTED_SERVER__INTEGRATIONS__PREBID__TIMEOUT_MS=1000
# TRUSTED_SERVER__INTEGRATIONS__PREBID__BIDDERS=kargo,rubicon,appnexus
# TRUSTED_SERVER__INTEGRATIONS__PREBID__AUTO_CONFIGURE=false
# TRUSTED_SERVER__INTEGRATIONS__PREBID__DEBUG=false

# Next.js
TRUSTED_SERVER__INTEGRATIONS__NEXTJS__ENABLED=false
# TRUSTED_SERVER__INTEGRATIONS__NEXTJS__REWRITE_ATTRIBUTES=href,link,url

# Didomi
TRUSTED_SERVER__INTEGRATIONS__DIDOMI__ENABLED=false
# TRUSTED_SERVER__INTEGRATIONS__DIDOMI__SDK_ORIGIN=https://sdk.privacy-center.org
# TRUSTED_SERVER__INTEGRATIONS__DIDOMI__API_ORIGIN=https://api.privacy-center.org

# Permutive
TRUSTED_SERVER__INTEGRATIONS__PERMUTIVE__ENABLED=false
# TRUSTED_SERVER__INTEGRATIONS__PERMUTIVE__ORGANIZATION_ID=
# TRUSTED_SERVER__INTEGRATIONS__PERMUTIVE__WORKSPACE_ID=
# TRUSTED_SERVER__INTEGRATIONS__PERMUTIVE__PROJECT_ID=

# Lockr
TRUSTED_SERVER__INTEGRATIONS__LOCKR__ENABLED=false
# TRUSTED_SERVER__INTEGRATIONS__LOCKR__APP_ID=
# TRUSTED_SERVER__INTEGRATIONS__LOCKR__CACHE_TTL_SECONDS=3600

# =============================================================================
# Rewrite Configuration (optional)
# =============================================================================
# Comma-separated list of domains to exclude from first-party rewriting
# TRUSTED_SERVER__REWRITE__EXCLUDE_DOMAINS=*.edgecompute.app
10 changes: 5 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches: [main]
paths:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch: # Allow manual triggers
- "docs/**"
- ".github/workflows/deploy-docs.yml"
workflow_dispatch: # Allow manual triggers

# Sets permissions for GitHub Pages deployment
permissions:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # For lastUpdated feature
fetch-depth: 0 # For lastUpdated feature

- name: Retrieve Node.js version
id: node-version
Expand All @@ -36,7 +36,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.node-version }}
cache: 'npm'
cache: "npm"
cache-dependency-path: docs/package-lock.json

- name: Setup Pages
Expand Down
45 changes: 38 additions & 7 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache cargo dependencies
uses: actions/cache@v4
with:
Expand All @@ -23,7 +23,7 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Retrieve Rust version
id: rust-version
run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Add wasm32-wasi target
run: rustup target add wasm32-wasip1

- name: Run cargo fmt
uses: actions-rust-lang/rustfmt@v1

Expand All @@ -49,7 +49,7 @@ jobs:
defaults:
run:
working-directory: crates/js/lib

steps:
- uses: actions/checkout@v4

Expand All @@ -58,19 +58,50 @@ jobs:
working-directory: .
run: echo "node-version=$(grep '^nodejs ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT
shell: bash

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.node-version }}
cache: 'npm'
cache: "npm"
cache-dependency-path: crates/js/lib/package.json

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint


- name: Run Prettier (check)
run: npm run format

format-docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: crates/js/lib

steps:
- uses: actions/checkout@v4

- name: Retrieve Node.js version
id: node-version
working-directory: .
run: echo "node-version=$(grep '^nodejs ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT
shell: bash

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.node-version }}
cache: "npm"
cache-dependency-path: crates/js/lib/package.json

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Run Prettier (check)
run: npm run format
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.node-version }}
cache: 'npm'
cache: "npm"
cache-dependency-path: crates/js/lib/package.json

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fastly 13.1.0
fastly 13.3.0
rust 1.91.1
nodejs 24.10.0
nodejs 24.12.0
Loading