Skip to main content
Version: 4.6.1-saas

Initialization Settings

This document explains environment variable configuration and additional features available in NetFUNNEL Cloudflare Agent.


Environment Variables

Environment variables are variables set in Cloudflare Worker settings that control the behavior of the NetFUNNEL agent.

Required Settings

CLIENT_ID

Enter the client ID issued from the NetFUNNEL console.

TypeNameValueDescription
TextCLIENT_ID{{CLIENT_ID}}Client ID checked in NetFUNNEL console

Configuration steps:

  1. Select Worker in [Workers and Pages]
  2. Click [Settings] tab
  3. Click [+ Add] in Variables and secrets
  4. Type: Select Text
  5. Name: CLIENT_ID
  6. Value: Enter Client ID from NetFUNNEL console
  7. Click [Deploy]

Additional Features

Good Bot Exception Handling

You can exclude specific User-Agent values from agent behavior through Worker settings.

Environment Variable Configuration

TypeNameValueDescription
TextGOOD_BOTSGooglebot, Bingbot, Slurp, Applebot, facebookexternalhitList of bot User-Agents to exclude (comma-separated)

Example: Example of excluding Google, Microsoft, Yahoo, Apple, and Facebook bots.

Configuration steps:

  1. Select Worker with agent applied in [Workers and Pages]
  2. Click [Settings] tab
  3. Click [+ Add] in Variables and secrets
  4. Type: Select Text
  5. Name: GOOD_BOTS
  6. Value: Enter User-Agents of good bots to exclude, separated by commas
  7. Click [Deploy]

Entry Key Automatic Return Processing

NetFUNNEL Cloudflare agent automatically returns the NetFUNNEL key after entry to allow the next person in queue to enter. This feature can be used when you want to return the NetFUNNEL key at the timeout time set in the segment instead of returning it immediately.

Environment Variable Configuration

TypeNameValueDescription
TextRETURN_KEYtrue or falseWhether to automatically return entry key
  • true (default): The agent automatically returns the NetFUNNEL key when entering after waiting is complete.
  • false: The key is returned at the timeout time set in the segment.

Configuration steps:

  1. Select Worker with agent applied in [Workers and Pages]
  2. Click [Settings] tab
  3. Click [+ Add] in Variables and secrets
  4. Type: Select Text
  5. Name: RETURN_KEY
  6. Value: Enter true or false
  7. Click [Deploy]

Waiting Room Domain Change

The domain of the NetFUNNEL waiting room page is agent-lib.stclab.com. To change this domain to match your service domain, contact the NetFUNNEL service team with your desired domain and change the Worker settings.

Environment Variable Configuration

TypeNameValueDescription
TextVWR_PAGE_DOMAINhttp(s)://{CNAME_DOMAIN}Waiting room domain URL

Example: https://wait.stclab.com

Configuration steps:

  1. Select Worker with agent applied in [Workers and Pages]
  2. Click [Settings] tab
  3. Click [+ Add] in Variables and secrets
  4. Type: Select Text
  5. Name: VWR_PAGE_DOMAIN
  6. Value: Enter the waiting room domain URL you want to change (e.g., https://wait.stclab.com)
  7. Click [Deploy]

When storing keys issued by the NetFUNNEL server in cookies, they are stored based on the current page's domain. If you need to share keys between different subdomains, configure it so that the main domain is stored in cookies.

Example: Set to .stclab.com so that cookies are shared between pages with different subdomains such as develop.stclab.com and staging.stclab.com.

Environment Variable Configuration

TypeNameValueDescription
TextCOOKIE_DOMAIN.{MAIN_DOMAIN}Cookie domain

Example: .stclab.com

Configuration steps:

  1. Select Worker with agent applied in [Workers and Pages]
  2. Click [Settings] tab
  3. Click [+ Add] in Variables and secrets
  4. Type: Select Text
  5. Name: COOKIE_DOMAIN
  6. Value: Enter in main domain format (e.g., .stclab.com)
  7. Click [Deploy]

Worker Deployment

After changing environment variables, you must deploy the Worker for the changes to take effect.

  1. Click [Deploy] button after completing environment variable configuration
  2. Changes are applied after deployment is complete