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
Add a configuration setting to "hard"-disable creation of notes as
set by the configuration value. This defaults to `['robots.txt',
'favicon.ico']`, because these files are often accidentally created
by bots and browsers.
This commit fixes#1052.
Signed-off-by: Daan Sprenkels <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,7 @@ There are some config settings you need to change in the files below.
186
186
|`CMD_ALLOW_ANONYMOUS`|`true` or `false`| set to allow anonymous usage (default is `true`) |
187
187
|`CMD_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`) |
188
188
|`CMD_ALLOW_FREEURL`|`true` or `false`| set to allow new note creation by accessing a nonexistent note URL |
189
+
|`CMD_FORBIDDEN_NODE_IDS`|`'robots.txt'`| disallow creation of notes, even if `CMD_ALLOW_FREEURL` is `true`|
189
190
|`CMD_DEFAULT_PERMISSION`|`freely`, `editable`, `limited`, `locked` or `private`| set notes default permission (only applied on signed users) |
190
191
|`CMD_DB_URL`|`mysql://localhost:3306/database`| set the database URL |
191
192
|`CMD_SESSION_SECRET`| no example | Secret used to sign the session cookie. If non is set, one will randomly generated on startup |
@@ -284,6 +285,7 @@ There are some config settings you need to change in the files below.
284
285
|`allowAnonymous`|`true` or `false`| set to allow anonymous usage (default is `true`) |
285
286
|`allowAnonymousEdits`|`true` or `false`| if `allowAnonymous` is `true`: allow users to select `freely` permission, allowing guests to edit existing notes (default is `false`) |
286
287
|`allowFreeURL`|`true` or `false`| set to allow new note creation by accessing a nonexistent note URL |
288
+
|`forbiddenNoteIDs`|`['robots.txt']`| disallow creation of notes, even if `allowFreeUrl` is `true`|
287
289
|`defaultPermission`|`freely`, `editable`, `limited`, `locked`, `protected` or `private`| set notes default permission (only applied on signed users) |
288
290
|`dbURL`|`mysql://localhost:3306/database`| set the db URL; if set, then db config (below) won't be applied |
289
291
|`db`|`{ "dialect": "sqlite", "storage": "./db.codimd.sqlite" }`| set the db configs, [see more here](http://sequelize.readthedocs.org/en/latest/api/sequelize/)|
0 commit comments