Router Configuration
Configure the Router module through environment variables and Admin Panel.
Port Configuration
| Variable | Default | Description |
|---|---|---|
CLIENT_HTTP_PORT | 3000 | REST and GraphQL port |
CLIENT_SOCKET_PORT | 3001 | WebSocket port |
Security Settings
Configure via Admin Panel > Router > Settings:
Client Validation
Enable client ID/secret verification for all requests:
- Applications must send
clientIdandclientSecretheaders - Create clients in Admin Panel
Rate Limiting
| Setting | Description |
|---|---|
| Enabled | Turn rate limiting on/off |
| Window | Time window in seconds |
| Max Requests | Maximum requests per window |
Security Headers
Helmet middleware provides security headers:
- X-Content-Type-Options
- X-Frame-Options
- X-XSS-Protection
CORS Configuration
| Setting | Description |
|---|---|
| Origins | Allowed origins |
| Methods | Allowed HTTP methods |
| Headers | Allowed headers |
Best Practices
- Enable client validation in production
- Configure CORS for your domains only
- Set rate limits to prevent abuse
- Use HTTPS in production