From 4457d6f525aa8544649be5aab93cebf86413169f Mon Sep 17 00:00:00 2001 From: Stavros Date: Wed, 22 Jan 2025 21:37:59 +0200 Subject: [PATCH] feat: add cookie secure option in the cli --- cmd/root.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 53b95b8..ba7b0d7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -106,11 +106,13 @@ func init() { rootCmd.Flags().String("app-url", "", "The tinyauth URL.") rootCmd.Flags().String("users", "", "Comma separated list of users in the format username:bcrypt-hashed-password.") rootCmd.Flags().String("users-file", "", "Path to a file containing users in the format username:bcrypt-hashed-password.") + rootCmd.Flags().Bool("cookie-secure", false, "Send cookie over secure connection only.") viper.BindEnv("port", "PORT") viper.BindEnv("address", "ADDRESS") viper.BindEnv("secret", "SECRET") viper.BindEnv("app-url", "APP_URL") viper.BindEnv("users", "USERS") viper.BindEnv("users-file", "USERS_FILE") + viper.BindEnv("cookie-secure", "COOKIE_SECURE") viper.BindPFlags(rootCmd.Flags()) }