Pottr/Docs
Topic:System Configuration & Environment
Build & Integrate
.md

System Configuration & Environment

wp-config.php constants for CORS origins, local development, email URLs, and trusted reverse proxies.

Available wp-config.php Constants

ConstantTypeDescription
POTTR_ALLOWED_ORIGINStringSingle production domain allowed for cross-origin browser requests.
POTTR_ALLOWED_ORIGINSStringComma-separated list of multiple allowed frontend origins.
POTTR_DEV_MODEBooleanWhen true, automatically permits any localhost or 127.0.0.1 port. (Never enable in production).
POTTR_APP_URLStringFrontend application base URL for password reset links in transactional emails.
POTTR_TRUSTED_PROXIESStringComma-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' );