useshortcut / shortcut-client-js

The official JavaScript client library for the Shortcut (formerly Clubhouse) REST API.
https://useshortcut.github.io/shortcut-client-js/
132 stars 31 forks source link

CORS Header ‘Access-Control-Allow-Origin’ Missing Error #137

Closed KoltonG closed 2 years ago

KoltonG commented 2 years ago

👋 Hi Shortcut team,

I am facing a CORS issue when using the @useshortcut/client package with a valid token. I am able to hit your API successfully via Postman and Insomnia, but when using this package on CodeSandbox I get the following error.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.app.shortcut.com/api/v3/projects. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Step to reproduce

The CodeSandbox below was created to show the issue that I am facing.

🔗 https://codesandbox.io/s/useshortcut-client-cors-error-lkde01?file=/src/App.tsx