Closed idoberko2 closed 2 weeks ago
Fix CORS response headers for requests containing the comet-workspace request header.
comet-workspace
OPIK-136
Added an E2E test that covers and tested locally.
Before this change:
❯ curl 'http://localhost:5173/api/v1/private/projects' \ -X 'OPTIONS' \ -H 'access-control-request-headers: comet-workspace' \ -H 'access-control-request-method: GET' \ -H 'origin: http://localhost:5173' \ -i HTTP/1.1 200 OK Server: nginx/1.27.2 Date: Thu, 31 Oct 2024 07:20:57 GMT Content-Length: 0 Connection: keep-alive Vary: Origin
After this change:
❯ curl 'http://localhost:5173/api/v1/private/projects' \ -X 'OPTIONS' \ -H 'access-control-request-headers: comet-workspace' \ -H 'access-control-request-method: GET' \ -H 'origin: http://localhost:5173' \ -i HTTP/1.1 200 OK Server: nginx/1.27.2 Date: Thu, 31 Oct 2024 07:10:04 GMT Content-Length: 0 Connection: keep-alive Vary: Origin Access-Control-Allow-Origin: http://localhost:5173 Access-Control-Allow-Credentials: true Access-Control-Max-Age: 1800 Access-Control-Allow-Methods: OPTIONS,GET,PUT,POST,DELETE,HEAD,PATCH Access-Control-Allow-Headers: Authorization,Content-Type,Accept,X-Requested-With,Origin,Comet-Sdk-Api,comet-username,comet-react-ver,comet-workspace
Details
Fix CORS response headers for requests containing the
comet-workspace
request header.Issues
OPIK-136
Testing
Added an E2E test that covers and tested locally.
Before this change:
After this change: