question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where to put CORSANYWHERE_WHITELIST variable when setting up demo server on Heroku?

See original GitHub issue

Hi! First off thanks for the great resource. I followed the instructions in the Demo Server section of the readme, but I’m not sure where to place this part to whitelist my specific site:

export CORSANYWHERE_WHITELIST=https://www.boardgamegeek.com/
node server.js

I’ve tried making an .env file with that text. I’ve tried adding it to the Procfile. I’ve tried adding it as a config var as described in the Heroku tutorial. I also tried adding it to originWhitelist key of the corsAnywhere object on line 262 of cors-anywhere.js.

I’m sure the answer is super obvious, but I’m too much of a noob to know where this goes. 😅

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
GamerKingFaizcommented, Jul 30, 2020

Sorry for not being clear. To address your three points:

I was able to get it working by just setting the CORSANYWHERE_WHITELIST variable to http://localhost:3000,https://betterbggcollection.com.

Thanks for your help, I’ll go ahead and close this issue out now!

0reactions
woctezumacommented, Jan 22, 2021

For info, there is a web page at https://dashboard.heroku.com/apps/HEROKUNAME-HEROKUID/settings

where you can set config vars:

Heroku config

I have not tested it yet, but I think that is one way to set the config vars mentioned in the README.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rob--W/cors-anywhere - Buildpacks - Heroku Elements
CORS Anywhere is a NodeJS proxy which adds CORS headers to the proxied request. The url to proxy is literally taken from the...
Read more >
How do setup an own server with cors-anywhere #217 - GitHub
Open the browser's developer tools, switch to the network tab and watch the requests. If you cannot make sense of it (e.g. when...
Read more >
How to use Cors anywhere to reverse proxy and add CORS ...
Create a script that contains the example in the readme and run node path/to/script.js . Then on your page, you simply make a...
Read more >
Setup your own CORS proxy / Eric Dietrich - Observable
Install the heroku CLI and login, then: # clone the server git clone https://github.com/Rob--W/cors-anywhere cd cors-anywhere # create an app on heroku.
Read more >
Adding CORS support to an API proxy | Apigee Edge
You need to manually create a new Assign Message policy and copy the code for the Add CORS policy listed in the previous...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found