mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add support for secret keys exposed as a file
Secret keys are often exposed as a file in containerized environments.
This commit is contained in:
parent
1d6b0491a7
commit
d2f4ed93df
4 changed files with 71 additions and 4 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/logger"
|
||||
"miniflux.app/model"
|
||||
"miniflux.app/storage"
|
||||
|
@ -15,8 +16,8 @@ import (
|
|||
|
||||
func createAdmin(store *storage.Storage) {
|
||||
user := model.NewUser()
|
||||
user.Username = os.Getenv("ADMIN_USERNAME")
|
||||
user.Password = os.Getenv("ADMIN_PASSWORD")
|
||||
user.Username = config.Opts.AdminUsername()
|
||||
user.Password = config.Opts.AdminPassword()
|
||||
user.IsAdmin = true
|
||||
|
||||
if user.Username == "" || user.Password == "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue