summaryrefslogtreecommitdiff
path: root/lib/config/hackmdEnvironment.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-06-20Backport of #278 for 1.6.1Victor Berger1-1/+2
This is a backport of #278 with the default value of `scope` changed to `undefined`. This is thus a fully backward-compatible change. Signed-off-by: Victor Berger <victor.berger@m4x.org>
2019-05-31Fix eslint warningsSheogorath1-1/+1
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-04-06Added a configuration option for passport-saml:Emmanuel Ormancey1-0/+1
disableRequestedAuthnContext: true|false By default only Password authmethod is accepted, this option allows any other method. Issue and option described here: https://github.com/bergie/passport-saml/issues/226 Signed-off-by: Emmanuel Ormancey <emmanuel.ormancey@cern.ch>
2019-03-04Fix wrong value type for HSTS environment variableSheogorath1-1/+1
Seem like also environment variables are affected. This patch fixes that as well. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-24Rename environment variables and add legacy support.Sheogorath1-1/+0
As we are no longer HackMD the short tag `HMD` doesn't match anymore. We move it to the matching prefix `CMD` and inform our users about the change. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-23Allow to disable gravatarSheogorath1-0/+1
Since Gravatar is an external image source and not perfect from a privacy perspective, forbidding it allows to improve privacy. This commit also simplifies and optimizes the avatar code. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-01Add Azure Blob Storage supportÁdám Hóka1-0/+4
Signed-off-by: Adam Hoka <hoka.adam@nexogen.hu>
2018-05-16Revert "Workaround Google API problems"Christoph (Sheogorath) Kern1-1/+0
2018-04-13Use API key instead of clientSecretSheogorath1-0/+1
As recently discovered we send the clientSecret to the webclient which is potentionally dangerous. This patch should fix the problem and replace the clientSecret with the originally intended and correct way to implement it using the API key. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-29Add session data to env varsSheogorath1-0/+2
Currently the session secret can only be set by config.json or docker secrets. This creates a problem on Heroku hosted instances that can not set a session secret. Since we automatically generate them on startup this results in an logout of all users on every config change in Heroku. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-26Add support for generic OAuth2 providersPedro Ferreira1-0/+11
Signed-off-by: Pedro Ferreira <pedro.ferreira@cern.ch>
2018-03-25Change config to camel case with backwards compatibilitySheogorath1-14/+14
This refactors the configs a bit to now use camel case everywhere. This change should help to clean up the config interface and make it better understandable. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-16Add helper function to fix number problemsSheogorath1-3/+3
As minio causes various problem if you configure it using environment variables and leave the port setting out, which will evaluate to NaN, this change should fix this in a clean way for this time and helps to support numbers in general in future. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-15Convert HMD_MINIO_PORT into Number type.vazontang1-1/+1
fix hackmdio/hackmd#763 Signed-off-by: Tang TsungYi <vazontang@gmail.com>
2018-03-14Add config option for report URI in CSPSheogorath1-1/+2
This option is needed as it's currently not possible to add an report URI by the directives array. This option also allows to get CSP reports not only on docker based setup but also on our heroku instances. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-05Remove unused LDAP option `tokenSecret`Felix Schäfer1-1/+0
hackmdio/hackmd#754 Signed-off-by: Felix Schäfer <felix@thegcat.net>
2018-03-01Introduce ldap.useridFieldDustin Frisch1-0/+1
Signed-off-by: Dustin Frisch <fooker@lab.sh>
2018-01-27Remove camel case from `imageuploadtype` in configSheogorath1-1/+1
This removes the only camel cased option of the config options **we** added to the config.json. In auth provider's config parts are a lot of camel cased options provided. We shouldn't touch them to keep them as similar as possible to the examples. Fixes #315 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-23Fix broken port configSheogorath1-1/+1
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-20Add option to enable `freely` permission in closed instanceDario Ernst1-0/+1
Before, closed disallowed guest edits completely, by removing the `freely` permission. This makes it possible to explicitely bring back guest-editing, but not guest-note-creation, to closed instances. Signed-off-by: Dario Ernst <dario@kanojo.de>
2018-01-19Fix not passing app key correctly in dropbox configWu Cheng-Han1-1/+2
2017-12-09parse HMD_LDAP_SEARCHATTRIBUTES env var as a comma-separated arrayalecdwm1-5/+5
Signed-off-by: Alec WM <firstcontact@owls.io>
2017-12-09Add setting `ldap.usernameField`Lukas Kalbertodt1-0/+1
This determines which ldap field is used as the username on HackMD. By default, the "id" is used as username, too. The id is taken from the fields `uidNumber`, `uid` or `sAMAccountName`. To give the user more flexibility, they can now choose the field used for the username instead.
2017-12-04added guide for SAML settingsNorihito Nakae1-1/+0
2017-11-29added environment variables for SAMLNorihito Nakae1-1/+12
2017-11-28Initial support for SAML authenticationNorihito Nakae1-0/+4
2017-10-31Add mattermost authenticationChristoph Witzany1-0/+5
2017-10-25Adds PDF export via configgeekyd1-1/+2
2017-10-22Change CSP config format to be more intuitiveLiterallie1-0/+3
2017-10-13Add env vars for extra HSTS optionsLiterallie1-0/+3
2017-10-13Add on/off env var for HSTSLiterallie1-0/+3
2017-10-11Fix missing boolean setting for HMD_URL_ADDPORTSheogorath1-1/+1
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2017-08-30Add support for minioMarc Deop1-0/+7
2017-05-08fix(config): ssl environment configs not parse properlyRaccoon Li1-6/+9
2017-05-08fix(config): some environment config not parse properlyRaccoon Li1-6/+6
2017-05-08refactor(config.js): Extract config fileBoHong Li1-0/+64
* Separate different config source to each files * Freeze config object