diff --git a/docs/Configuration.md b/docs/Configuration.md index b094e1d0..c44f06e0 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -92,7 +92,12 @@ Note that certain chain options affect the format and indexing of the chain data - `api-key`: API key (used for accessing all node APIs). - `wallet-auth`: Enable token auth for wallets (default: false). - `no-auth`: Disable auth for API server and wallets (default: false). +- `cors`: Enable "Cross-Origin Resource Sharing" HTTP headers (default: false). + +Note: For security `cors` should not be used with `no-auth`.\ +If enabled you should also enable `wallet-auth` and set `api-key`. ## Sample Config File -See https://github.com/bcoin-org/bcoin/blob/master/etc/sample.conf. +See https://github.com/bcoin-org/bcoin/blob/master/etc/sample.conf +and https://github.com/bcoin-org/bcoin/blob/master/etc/sample.wallet.conf diff --git a/etc/sample.conf b/etc/sample.conf index 6999ef9b..090239a8 100644 --- a/etc/sample.conf +++ b/etc/sample.conf @@ -113,11 +113,4 @@ http-host: :: # ssl-key: @/ssl/priv.key api-key: bikeshed # no-auth: false - -# -# Wallet -# - -wallet-witness: false -wallet-checkpoints: true -wallet-auth: false +# cors: false diff --git a/etc/sample.wallet.conf b/etc/sample.wallet.conf new file mode 100644 index 00000000..ca4192cb --- /dev/null +++ b/etc/sample.wallet.conf @@ -0,0 +1,28 @@ +# Sample bcoin wallet config file (~/.bcoin/wallet.conf) + +# +# Options +# + +# network: main + +# +# HTTP +# + +http-host: :: +# http-port: 8334 +# ssl: true +# ssl-cert: @/ssl/cert.crt +# ssl-key: @/ssl/priv.key +api-key: bikeshed +# no-auth: false +# cors: false + +# +# Wallet +# + +witness: false +checkpoints: true +wallet-auth: false