Skip to content

nightlight-app/cors-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

cors-proxy

Implementing a CORS proxy using Cloudflare Workers to overcome the limitations of the Notion API, which does not allow cross-origin requests by default.

See issue here: makenotion/notion-sdk-js#96

How is this deployed?

This worker is deployed on Cloudflare.

Steps to set this up:

  1. Create a Cloudflare account at https://dash.cloudflare.com/
  2. Under Workers tab, click on Create a Service

  1. Name the service, and click Create Service

  1. Click on Quick Edit

  2. Paste the index.js file into the code editor (modified from https://developers.cloudflare.com/workers/examples/cors-header-proxy/)

  3. Click Deploy!

Now any requests made to https://demo.zinean00.workers.dev/cors/<url> will forward the requests to <url> while adding the "Access-Control-Allow-Origin: *" in the reply header.

This then allows us to make requests to Notion API through a browser!

About

Simple CORS proxy using Cloudflare worker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published