The use of Heroku for operating an open proxy, so make sure that you either enforce a whitelist as Note that their Acceptable Use Policy forbids This application can immediately be run on Heroku, see įor instructions. The CORS Anywhere server only whitelists your site to prevent others from using your instance ofįor instance, to run a CORS Anywhere server that accepts any request from some sites on If you expect lots of traffic, please host your own instance of CORS Anywhere, and make sure that Stays available to everyone, the number of requests per period is limited, except for requests from Only provided so that you can easily and quickly try out CORS Anywhere. Demo serverĪ public demo of CORS Anywhere is available at. See the sample code in test/test-examples.js. The given options are passed to theįor even more advanced usage (building upon CORS Anywhere), httpsOptions - If set, a https.Server will be created.The documentation for these options can be found here. Use this option if you really need to pass options httpProxyOptions - Under the hood, http-proxy.string helpFile - Set the help file (shown at the homepage).įor advanced users, the following options are also provided.number corsMaxAge - If set, an Access-Control-Max-Age request header with this value (in seconds) will be added.Įxample: 600 - Allow CORS preflight request to be cached by the browser for 10 minutes.PORT || 8080 var cors_proxy = require ( 'cors-anywhere' ) cors_proxy. HOST || '0.0.0.0' // Listen on a specific port via the PORT environment variable var port = process. Listen on a specific host via the HOST environment variable var host = process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |