summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-23 22:27:02 +0800
committerWu Cheng-Han2016-10-23 22:27:02 +0800
commitd37321e28de0445322055ef20306d838b02a6f87 (patch)
tree4dc2337cef49e7de30a371be9e410304eab9f7b4
parent0aa306685d164c82dd7275534564849017da39b6 (diff)
Change use cdn config option default to be true
-rw-r--r--README.md3
-rw-r--r--lib/config.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9af4fbdb..08f6fc9e 100644
--- a/README.md
+++ b/README.md
@@ -116,6 +116,7 @@ Environment variables (will overwrite other server configs)
| HMD_ALLOW_ORIGIN | `localhost, hackmd.io` | domain name whitelist (use comma to separate) |
| HMD_PROTOCOL_USESSL | `true` or `false` | set to use ssl protocol for resources path (only applied when domain is set) |
| HMD_URL_ADDPORT | `true` or `false` | set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set) |
+| HMD_USECDN | `true` or `false` | set to use CDN resources or not (default is `true`) |
| HMD_FACEBOOK_CLIENTID | no example | Facebook API client id |
| HMD_FACEBOOK_CLIENTSECRET | no example | Facebook API client secret |
| HMD_TWITTER_CONSUMERKEY | no example | Twitter API consumer key |
@@ -144,7 +145,7 @@ Server settings `config.json`
| usessl | `true` or `false` | set to use ssl server (if true will auto turn on `protocolusessl`) |
| protocolusessl | `true` or `false` | set to use ssl protocol for resources path (only applied when domain is set) |
| urladdport | `true` or `false` | set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set) |
-| usecdn | `true` or `false` | set to use CDN resources or not |
+| usecdn | `true` or `false` | set to use CDN resources or not (default is `true`) |
| db | `{ "dialect": "sqlite", "storage": "./db.hackmd.sqlite" }` | set the db configs, [see more here](http://sequelize.readthedocs.org/en/latest/api/sequelize/) |
| sslkeypath | `./cert/client.key` | ssl key path (only need when you set usessl) |
| sslcertpath | `./cert/hackmd_io.crt` | ssl cert path (only need when you set usessl) |
diff --git a/lib/config.js b/lib/config.js
index b781c82b..0aa154bc 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -17,7 +17,7 @@ var protocolusessl = (usessl === true && typeof process.env.HMD_PROTOCOL_USESSL
? true : (process.env.HMD_PROTOCOL_USESSL ? (process.env.HMD_PROTOCOL_USESSL === 'true') : !!config.protocolusessl);
var urladdport = process.env.HMD_URL_ADDPORT ? (process.env.HMD_URL_ADDPORT === 'true') : !!config.urladdport;
-var usecdn = process.env.HMD_USECDN ? (process.env.HMD_USECDN === 'true') : !!config.usecdn;
+var usecdn = process.env.HMD_USECDN ? (process.env.HMD_USECDN === 'true') : !!!config.usecdn;
// db
var db = config.db || {