HarperDB
Search…
⌃K

Configuration

HarperDB was set up to require very minimal configuration to work out of the box. There are, however, some best practices we encourage for anyone building an app with HarperDB.

CORS

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 an access list of domains you can do the following:
  1. 1.
    Open the harperdb-config.yaml file this can be found in <ROOTPATH>, the location you specified during install.
  2. 2.
    In harperdb-config.yaml there should be 2 entries under operationsApi.network: cors and corsAccessList.
    • cors
      1. 1.
        To turn off, change to: cors: false
      2. 2.
        To turn on, change to: cors: true
    • corsAccessList
      1. 1.
        The corsAccessList will only be recognized by the system when cors is true
      2. 2.
        To create an access list you set corsAccessList to a comma-separated list of domains.
        i.e. corsAccessList is http://harperdb.io,http://products.harperdb.io
      3. 3.
        To clear out the access list and allow all domains: corsAccessList is [null]

SSL

HarperDB provides the option to use an HTTP or HTTPS interface. The default port for the server is 9925.
These default ports can be changed by updating the operationsApi.network.port value in <ROOTPATH>/harperdb-config.yaml
By default, HTTPS is turned off and HTTP is turned on. It is recommended that you never directly expose HarperDB's HTTP interface through a publicly available port. HTTP is intended for local or private network use.
You can toggle HTTPS and HTTP in the settings file. By setting operationsApi.network.https to true/false. When https is set to false, the server will use HTTP.
HarperDB automatically generates a certificate and a privateKey file which live at <ROOTPATH>/keys/.
You can replace these with your own certificate and key.
If any of these settings are changed please make sure to run harperdb restart as they will not take effect until a restart.
© HarperDB. All Rights Reserved