HarperDB allows for managing cross-origin HTTP requests. By default, HarperDB enables CORS for all domains if you need to disable CORS completely or set up whitelisted domains you can do the following:
- Open the HarperDB settings.js file this can be found in HDB_ROOT/config, where HDB_ROOT is the location you specified during install.
- In settings.js there should be 2 entries: CORS_ON & CORS_WHITELIST. If these entries do not exist add them as described below:
- To turn off CORS change to: CORS_ON=false
- To turn on CORS change to: CORS_ON=true
- The CORS_WHITELIST will only be recognized by the system when CORS_ON=true
- To create a whitelist you set CORS_WHITELIST to a comma-separated list of domains.
- To clear out the whitelist and allow all domains: CORS_WHITELIST=