-
Notifications
You must be signed in to change notification settings - Fork 0
Add CORS configuration guide and examples #55
Copy link
Copy link
Open
Labels
area: docsDocumentationDocumentationarea: securitySecurity featuresSecurity featuresdocumentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomerspriority: mediumShould haveShould havesize: small1-2 hours effort1-2 hours effort
Milestone
Metadata
Metadata
Assignees
Labels
area: docsDocumentationDocumentationarea: securitySecurity featuresSecurity featuresdocumentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomerspriority: mediumShould haveShould havesize: small1-2 hours effort1-2 hours effort
Description
Create a dedicated guide for CORS configuration in Nerva APIs. The pipeline config sets CORS defaults (`origins: ["*"]`), but there's no documentation explaining how to configure CORS for different environments.
Why
CORS misconfiguration is one of the most common API deployment issues. New developers frequently struggle with CORS errors. A dedicated guide with environment-specific examples (development wildcard, production allowlist) prevents hours of debugging.
Current State
`pipeline.config.json`:
```json
"cors": {
"enabled": true,
"origins": ["*"],
"methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
"allowHeaders": ["Content-Type", "Authorization", "X-API-Key"],
"maxAge": 86400
}
```
Acceptance Criteria