You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ There are some config settings you need to change in the files below.
147
147
|`HMD_URL_ADDPORT`|`true` or `false`| set to add port on callback URL (ports `80` or `443` won't be applied) (only applied when domain is set) |
148
148
|`HMD_USECDN`|`true` or `false`| set to use CDN resources or not (default is `true`) |
149
149
|`HMD_ALLOW_ANONYMOUS`|`true` or `false`| set to allow anonymous usage (default is `true`) |
150
-
|`HMD_ALLOW_ANONYMOUS_EDITS`|`true` or `false`| if `allowanonymous` is `true`, allow users to select `freely` permission, allowing guests to edit existing notes (default is `false`) |
150
+
|`HMD_ALLOW_ANONYMOUS_EDITS`|`true` or `false`| if `allowAnonymous` is `true`, allow users to select `freely` permission, allowing guests to edit existing notes (default is `false`) |
151
151
|`HMD_ALLOW_FREEURL`|`true` or `false`| set to allow new note creation by accessing a nonexistent note URL |
152
152
|`HMD_DEFAULT_PERMISSION`|`freely`, `editable`, `limited`, `locked` or `private`| set notes default permission (only applied on signed users) |
153
153
|`HMD_DB_URL`|`mysql://localhost:3306/database`| set the database URL |
@@ -215,46 +215,46 @@ There are some config settings you need to change in the files below.
215
215
| --------- | ------ | ----------- |
216
216
|`debug`|`true` or `false`| set debug mode, show more logs |
217
217
|`domain`|`localhost`| domain name |
218
-
|`urlpath`|`hackmd`| sub URL path, like `www.example.com/<urlpath>`|
218
+
|`urlPath`|`hackmd`| sub URL path, like `www.example.com/<urlpath>`|
219
219
|`port`|`80`| web app port |
220
-
|`alloworigin`|`['localhost']`| domain name whitelist |
221
-
|`usessl`|`true` or `false`| set to use SSL server (if `true`, will auto turn on `protocolusessl`) |
220
+
|`allowOrigin`|`['localhost']`| domain name whitelist |
221
+
|`useSSL`|`true` or `false`| set to use SSL server (if `true`, will auto turn on `protocolUseSSL`) |
222
222
|`hsts`|`{"enable": true, "maxAgeSeconds": 31536000, "includeSubdomains": true, "preload": true}`|[HSTS](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) options to use with HTTPS (default is the example value, max age is a year) |
223
-
|`csp`|`{"enable": true, "directives": {"scriptSrc": "trustworthy-scripts.example.com"}, "upgradeInsecureRequests": "auto", "addDefaults": true}`| Configures [Content Security Policy](https://helmetjs.github.io/docs/csp/). Directives are passed to Helmet - see [their documentation](https://helmetjs.github.io/docs/csp/) for more information on the format. Some defaults are added to the configured values so that the application doesn't break. To disable this behaviour, set `addDefaults` to `false`. Further, if `usecdn` is on, some CDN locations are allowed too. By default (`auto`), insecure (HTTP) requests are upgraded to HTTPS via CSP if `usessl` is on. To change this behaviour, set `upgradeInsecureRequests` to either `true` or `false`. |
224
-
|`protocolusessl`|`true` or `false`| set to use SSL protocol for resources path (only applied when domain is set) |
225
-
|`urladdport`|`true` or `false`| set to add port on callback URL (ports `80` or `443` won't be applied) (only applied when domain is set) |
226
-
|`usecdn`|`true` or `false`| set to use CDN resources or not (default is `true`) |
227
-
|`allowanonymous`|`true` or `false`| set to allow anonymous usage (default is `true`) |
228
-
|`allowanonymousedits`|`true` or `false`| if `allowanonymous` is `true`: allow users to select `freely` permission, allowing guests to edit existing notes (default is `false`) |
229
-
|`allowfreeurl`|`true` or `false`| set to allow new note creation by accessing a nonexistent note URL |
230
-
|`defaultpermission`|`freely`, `editable`, `limited`, `locked`, `protected` or `private`| set notes default permission (only applied on signed users) |
231
-
|`dburl`|`mysql://localhost:3306/database`| set the db URL; if set, then db config (below) won't be applied |
223
+
|`csp`|`{"enable": true, "directives": {"scriptSrc": "trustworthy-scripts.example.com"}, "upgradeInsecureRequests": "auto", "addDefaults": true}`| Configures [Content Security Policy](https://helmetjs.github.io/docs/csp/). Directives are passed to Helmet - see [their documentation](https://helmetjs.github.io/docs/csp/) for more information on the format. Some defaults are added to the configured values so that the application doesn't break. To disable this behaviour, set `addDefaults` to `false`. Further, if `usecdn` is on, some CDN locations are allowed too. By default (`auto`), insecure (HTTP) requests are upgraded to HTTPS via CSP if `useSSL` is on. To change this behaviour, set `upgradeInsecureRequests` to either `true` or `false`. |
224
+
|`protocolUseSSL`|`true` or `false`| set to use SSL protocol for resources path (only applied when domain is set) |
225
+
|`urlAddPort`|`true` or `false`| set to add port on callback URL (ports `80` or `443` won't be applied) (only applied when domain is set) |
226
+
|`useCDN`|`true` or `false`| set to use CDN resources or not (default is `true`) |
227
+
|`allowAnonymous`|`true` or `false`| set to allow anonymous usage (default is `true`) |
228
+
|`allowAnonymousEdits`|`true` or `false`| if `allowAnonymous` is `true`: allow users to select `freely` permission, allowing guests to edit existing notes (default is `false`) |
229
+
|`allowFreeURL`|`true` or `false`| set to allow new note creation by accessing a nonexistent note URL |
230
+
|`defaultPermission`|`freely`, `editable`, `limited`, `locked`, `protected` or `private`| set notes default permission (only applied on signed users) |
231
+
|`dbURL`|`mysql://localhost:3306/database`| set the db URL; if set, then db config (below) won't be applied |
232
232
|`db`|`{ "dialect": "sqlite", "storage": "./db.hackmd.sqlite" }`| set the db configs, [see more here](http://sequelize.readthedocs.org/en/latest/api/sequelize/)|
233
-
|`sslkeypath`|`./cert/client.key`| SSL key path (only need when you set `usessl`) |
234
-
|`sslcertpath`|`./cert/hackmd_io.crt`| SSL cert path (only need when you set `usessl`) |
235
-
|`sslcapath`|`['./cert/COMODORSAAddTrustCA.crt']`| SSL ca chain (only need when you set `usessl`) |
236
-
|`dhparampath`|`./cert/dhparam.pem`| SSL dhparam path (only need when you set `usessl`) |
|`email`|`true` or `false`| set to allow email signin |
253
-
|`allowemailregister`|`true` or `false`| set to allow email register (only applied when email is set, default is `true`. Note `bin/manage_users` might help you if registration is `false`.) |
254
-
| `imageuploadtype` | `imgur`(default), `s3`, `minio` or `filesystem` | Where to upload image
255
-
|`minio`|`{ "accessKey": "YOUR_MINIO_ACCESS_KEY", "secretKey": "YOUR_MINIO_SECRET_KEY", "endpoint": "YOUR_MINIO_HOST", port: 9000, secure: true }`| When `imageuploadtype` is set to `minio`, you need to set this key. Also checkout our [Minio Image Upload Guide](docs/guides/minio-image-upload.md)|
253
+
|`allowEmailRegister`|`true` or `false`| set to allow email register (only applied when email is set, default is `true`. Note `bin/manage_users` might help you if registration is `false`.) |
254
+
| `imageUploadType` | `imgur`(default), `s3`, `minio` or `filesystem` | Where to upload image
255
+
|`minio`|`{ "accessKey": "YOUR_MINIO_ACCESS_KEY", "secretKey": "YOUR_MINIO_SECRET_KEY", "endpoint": "YOUR_MINIO_HOST", port: 9000, secure: true }`| When `imageUploadType` is set to `minio`, you need to set this key. Also checkout our [Minio Image Upload Guide](docs/guides/minio-image-upload.md)|
256
256
|`s3`|`{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }`| When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](docs/guides/s3-image-upload.md)|
257
-
|`s3bucket`|`YOUR_S3_BUCKET_NAME`| bucket name when `imageuploadtype` is set to `s3` or `minio`|
257
+
|`s3bucket`|`YOUR_S3_BUCKET_NAME`| bucket name when `imageUploadType` is set to `s3` or `minio`|
0 commit comments