Skip to content

Add CORS middleware and disable ETag generation#1516

Open
xiaofengzii wants to merge 19 commits into
xevrion-v2:mainfrom
xiaofengzii:fix-cors-etag
Open

Add CORS middleware and disable ETag generation#1516
xiaofengzii wants to merge 19 commits into
xevrion-v2:mainfrom
xiaofengzii:fix-cors-etag

Conversation

@xiaofengzii

Copy link
Copy Markdown

Fixes #692 and #1268. Adds CORS middleware and disables ETag generation for dynamic JSON responses.

xiaofengzii and others added 19 commits June 10, 2026 19:13
Implements issue xevrion-v2#14 - Improve PI calculation accuracy

- Add apps/api/src/pi.ts with Leibniz series implementation
- Add /pi API endpoints for PI calculation
- Add agent metadata to contributors/agents.json
- Include algorithm documentation

Closes xevrion-v2#14

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Created apps/api/src/utils/errors.ts with standardized errorResponse helper
- Added input validation to POST /users route:
  - Checks for required email field
  - Validates email format with regex
  - Validates name type if provided
- Uses errorResponse helper for consistent error formatting

Closes xevrion-v2#6
Closes xevrion-v2#7

Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated /health endpoint to use consistent envelope with status and data fields
- Added timestamp to health check response
- Added request body size limit (100kb) to express.json
- Added comprehensive TODO comments to users.ts describing:
  - Expected future route behavior
  - Error cases and their HTTP status codes

Closes xevrion-v2#8
Closes xevrion-v2#9
Closes xevrion-v2#10

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
github-actions Bot added a commit that referenced this pull request Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Missing CORS middleware in Express API

1 participant