backend: support persistent JWT_SECRET

This commit is contained in:
Johannes Lötzsch 2022-03-12 16:04:21 +01:00
parent 220dacb949
commit 1ac545ae87
2 changed files with 11 additions and 6 deletions

View File

@ -7,8 +7,8 @@
(s/def ::frontend-base-url string?)
(s/def ::frontend-backend-base-url string?)
(s/def ::port number?) ;; the webserver port
(s/def ::jwt-secret (s/nilable string?))
(s/def ::verbose boolean?)
@ -34,6 +34,7 @@
(s/def ::env (s/keys :req-un [::frontend-base-url
::frontend-backend-base-url
::port
::jwt-secret
::verbose
::validate-output
::db-inmemory ::db-dir
@ -47,7 +48,8 @@
(defn strip-secrets [env]
(assoc env :mail-pass "*"
:admin-passphrase "*"))
:admin-passphrase "*"
:jwt-secret "*"))
(defn filter-defined [keys-spec m]
(let [req-un (last (s/form keys-spec))

View File

@ -1,7 +1,13 @@
{:verbose false
{
:frontend-base-url "http://localhost:4000"
:frontend-backend-base-url "http://localhost:4000"
:port 4000
:jwt-secret nil
:verbose false
:validate-output true
:db-inmemory false
@ -20,7 +26,4 @@
:admin-passphrase nil
:admin-gpg-id "9EA68B7F21204979645182E4287B083353C3241C"
:frontend-base-url "http://localhost:4000"
:frontend-backend-base-url "http://localhost:4000"
}