Build & Integrate
System Configuration & Environment
wp-config.php constants for CORS origins, local development, email URLs, and trusted reverse proxies.
Available wp-config.php Constants
| Constant | Type | Description |
|---|---|---|
POTTR_ALLOWED_ORIGIN | String | Single production domain allowed for cross-origin browser requests. |
POTTR_ALLOWED_ORIGINS | String | Comma-separated list of multiple allowed frontend origins. |
POTTR_DEV_MODE | Boolean | When true, automatically permits any localhost or 127.0.0.1 port. (Never enable in production). |
POTTR_APP_URL | String | Frontend application base URL for password reset links in transactional emails. |
POTTR_TRUSTED_PROXIES | String | Comma-separated proxy/load balancer IPs to trust for accurate client IP resolution. |
Configuration Example
wp-config.php
// 1. Allow production frontend origins
define( 'POTTR_ALLOWED_ORIGINS', 'https://app.example.com,https://staging.example.com' );
// 2. Frontend URL for password reset email links
define( 'POTTR_APP_URL', 'https://app.example.com' );
// 3. Trust reverse proxy (e.g. Cloudflare / Nginx) for accurate IP rate limiting
define( 'POTTR_TRUSTED_PROXIES', '10.0.0.1,10.0.0.2' );