Where to put CORSANYWHERE_WHITELIST variable when setting up demo server on Heroku?
See original GitHub issueHi! 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:
- Created 3 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for not being clear. To address your three points:
I was able to get it working by just setting the
CORSANYWHERE_WHITELIST
variable tohttp://localhost:3000,https://betterbggcollection.com
.Thanks for your help, I’ll go ahead and close this issue out now!
For info, there is a web page at
https://dashboard.heroku.com/apps/HEROKUNAME-HEROKUID/settings
where you can set config vars:
I have not tested it yet, but I think that is one way to set the config vars mentioned in the README.