1
0
Fork 0
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:
Frédéric Guillot 2020-06-29 20:49:05 -07:00
parent 1d6b0491a7
commit d2f4ed93df
4 changed files with 71 additions and 4 deletions

View file

@ -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 == "" {