April 29, 2020
CORS is a browser feature that blocks HTTP requests from one domain to another, unless the destination has the proper headers set up.
I recently ran into these problems when making an HTTP request from my website to Potion, an API I build for Notion notes.
I fixed it by adding headers to my Vercel deployment that allowed HTTP requests from any domain.
Here's my vercel.json
file:
{
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "access-control-allow-origin",
"value": "*"
}
]
}
]
}
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!