splitbee / notion-api-worker

Notion as CMS with easy API access
MIT License
1.56k stars 197 forks source link

Request header field Authorization is not allowed by Access-Control-Allow-Headers #71

Open jeanmw opened 2 years ago

jeanmw commented 2 years ago

On Safari, when making a request as documented with the Authorization header (with bearer token) I get the error:

Request header field Authorization is not allowed by Access-Control-Allow-Headers

This seems to indicate that this package cannot actually accept the Authorization header for private notion docs. Is there a way around this?

Does this mean that the only way to use this package for private notion docs is to host our own worker?

jeanmw commented 2 years ago

(this happens when hitting a GET request to https://notion-api.splitbee.io/v1/page/${id} where the id is a private notion doc and the headers contain Authorization:Bearer ${token}`).