CORS Demo
Avoid CORS issues by using API Routes from Next.js.
Get Started
- Clone the repo
git clone git@github.com:gregrickaby/cors-demo.git
- CD into
cors-demo
- Start the dev server
npm run dev
- Visit any of the pages in the
/demo
directory
ENV Vars
- Create a new file named
.env.local
- Add the following ENV Vars to
.env.local
# This ENV variable is passed to the user's web browser.
NEXT_PUBLIC_UNSPLASH_ACCESS_KEY='<your unsplash access key>'
# This ENV variable is not.
UNSPLASH_ACCESS_KEY='<your unsplash access key>'