mirror of
https://github.com/Unkn0wnCat/calapi.git
synced 2025-06-19 16:11:37 +02:00
Add authentication and metrics
This commit is contained in:
parent
7667ea7b90
commit
6abea91d7c
16 changed files with 894 additions and 31 deletions
10
cmd/root.go
10
cmd/root.go
|
@ -1,6 +1,8 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/Unkn0wnCat/calapi/internal/logger"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -23,5 +25,13 @@ func Execute() {
|
|||
}
|
||||
|
||||
func init() {
|
||||
viper.SetDefault("development", true)
|
||||
viper.SetDefault("data_directory", "./data")
|
||||
viper.SetDefault("auth.type", "GHOST")
|
||||
viper.SetDefault("auth.secret", "hunter2")
|
||||
viper.SetDefault("auth.anonymous_read", true)
|
||||
viper.SetDefault("auth.ghost.base_url", "https://content.hhga.1in9.net/ghost")
|
||||
viper.SetDefault("auth.ghost.limit_to_roles", nil)
|
||||
|
||||
logger.StartLogger()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue