mirror of
https://github.com/apidoorman/doorman.git
synced 2026-02-10 03:28:37 -06:00
1.2 KiB
1.2 KiB
Tools and Diagnostics
This page describes built-in tools available to help operate and troubleshoot your Doorman gateway.
CORS Checker
Validate your CORS configuration without trial-and-error in a browser.
- UI: Navigate to
/toolsin the web client (requiresmanage_securitypermission). - API:
POST /platform/tools/cors/check(requiresmanage_security).
Request body:
{
"origin": "https://app.example.com",
"method": "GET",
"request_headers": ["Content-Type", "Authorization"],
"with_credentials": true
}
Response highlights:
config: Effective CORS configuration derived from environment variables.preflight: Whether the preflight would be allowed and the headers that would be returned.actual: Whether an actual request would be allowed and expected response headers.notes: Guidance for common misconfigurations (e.g., wildcard with credentials).
Environment variables considered:
ALLOWED_ORIGINS,ALLOW_METHODS,ALLOW_HEADERS,ALLOW_CREDENTIALS,CORS_STRICT.
Tips:
- Avoid
*origins whenALLOW_CREDENTIALS=true; explicitly list origins or enableCORS_STRICT=true. - If
ALLOW_HEADERS='*'is set with credentials, the gateway applies a conservative default set.