# System Configuration & Environment

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

- **Category:** Build & Integrate
- **Canonical Guide:** https://pottr.tangble.com/docs/configuration

---

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

## Available `wp-config.php` Constants

<table class="docs-table">
<thead>
<tr>
<th>Constant</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`POTTR_ALLOWED_ORIGIN`</td>
<td>String</td>
<td>Single production domain allowed for cross-origin browser requests.</td>
</tr>
<tr>
<td>`POTTR_ALLOWED_ORIGINS`</td>
<td>String</td>
<td>Comma-separated list of multiple allowed frontend origins.</td>
</tr>
<tr>
<td>`POTTR_DEV_MODE`</td>
<td>Boolean</td>
<td>When `true`, automatically permits any `localhost` or `127.0.0.1` port. (Never enable in production).</td>
</tr>
<tr>
<td>`POTTR_APP_URL`</td>
<td>String</td>
<td>Frontend application base URL for password reset links in transactional emails.</td>
</tr>
<tr>
<td>`POTTR_TRUSTED_PROXIES`</td>
<td>String</td>
<td>Comma-separated proxy/load balancer IPs to trust for accurate client IP resolution.</td>
</tr>
</tbody>
</table>

## Configuration Example

**File: `wp-config.php`**

```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' );
```
