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.
| Type | Name | Value | Description |
|---|---|---|---|
| Text | CLIENT_ID | {{CLIENT_ID}} | Client ID checked in NetFUNNEL console |
Configuration steps:
- Select Worker in [Workers and Pages]
- Click [Settings] tab
- Click [+ Add] in Variables and secrets
- Type: Select Text
- Name:
CLIENT_ID - Value: Enter Client ID from NetFUNNEL console
- Click [Deploy]
Additional Features
Good Bot Exception Handling
You can exclude specific User-Agent values from agent behavior through Worker settings.
Environment Variable Configuration
| Type | Name | Value | Description |
|---|---|---|---|
| Text | GOOD_BOTS | Googlebot, Bingbot, Slurp, Applebot, facebookexternalhit | List of bot User-Agents to exclude (comma-separated) |
Example: Example of excluding Google, Microsoft, Yahoo, Apple, and Facebook bots.
Configuration steps:
- Select Worker with agent applied in [Workers and Pages]
- Click [Settings] tab
- Click [+ Add] in Variables and secrets
- Type: Select Text
- Name:
GOOD_BOTS - Value: Enter User-Agents of good bots to exclude, separated by commas
- 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
| Type | Name | Value | Description |
|---|---|---|---|
| Text | RETURN_KEY | true or false | Whether 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:
- Select Worker with agent applied in [Workers and Pages]
- Click [Settings] tab
- Click [+ Add] in Variables and secrets
- Type: Select Text
- Name:
RETURN_KEY - Value: Enter
trueorfalse - 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
| Type | Name | Value | Description |
|---|---|---|---|
| Text | VWR_PAGE_DOMAIN | http(s)://{CNAME_DOMAIN} | Waiting room domain URL |
Example: https://wait.stclab.com
Configuration steps:
- Select Worker with agent applied in [Workers and Pages]
- Click [Settings] tab
- Click [+ Add] in Variables and secrets
- Type: Select Text
- Name:
VWR_PAGE_DOMAIN - Value: Enter the waiting room domain URL you want to change (e.g.,
https://wait.stclab.com) - Click [Deploy]
Cookie Domain Configuration
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
| Type | Name | Value | Description |
|---|---|---|---|
| Text | COOKIE_DOMAIN | .{MAIN_DOMAIN} | Cookie domain |
Example: .stclab.com
Configuration steps:
- Select Worker with agent applied in [Workers and Pages]
- Click [Settings] tab
- Click [+ Add] in Variables and secrets
- Type: Select Text
- Name:
COOKIE_DOMAIN - Value: Enter in main domain format (e.g.,
.stclab.com) - Click [Deploy]
Worker Deployment
After changing environment variables, you must deploy the Worker for the changes to take effect.
- Click [Deploy] button after completing environment variable configuration
- Changes are applied after deployment is complete
Related Documentation
- Installation and Initialization: Basic environment variable configuration
- Troubleshooting: Common issues and solutions