feat: open API v1 and postman collection

This commit is contained in:
Adnan Zahir
2026-04-14 15:14:31 +07:00
parent fbe0634d46
commit 1ab16cfe06
18 changed files with 14668 additions and 4 deletions
+4 -2
View File
@@ -23,6 +23,7 @@ type SSOClientConfig struct {
var (
IsProd bool
AppEnv string
AppHost string
Version string
LogLevel string
@@ -84,7 +85,8 @@ func init() {
loadConfig()
// server configuration
IsProd = viper.GetString("APP_ENV") == "prod"
AppEnv = defaultString(strings.TrimSpace(viper.GetString("APP_ENV")), "development")
IsProd = AppEnv == "prod"
AppHost = viper.GetString("APP_HOST")
AppPort = viper.GetInt("APP_PORT")
Version = viper.GetString("VERSION")
@@ -111,7 +113,7 @@ func init() {
// Cors
CORSAllowOrigins = parseList("CORS_ALLOW_ORIGINS")
CORSAllowMethods = parseListWithDefault("CORS_ALLOW_METHODS", "GET,POST,PUT,PATCH,DELETE,OPTIONS")
CORSAllowHeaders = parseListWithDefault("CORS_ALLOW_HEADERS", "Content-Type,Authorization,X-Requested-With")
CORSAllowHeaders = parseListWithDefault("CORS_ALLOW_HEADERS", "Content-Type,Authorization,X-API-Key,X-Requested-With")
CORSExposeHeaders = parseList("CORS_EXPOSE_HEADERS")
CORSAllowCredentials = viper.GetBool("CORS_ALLOW_CREDENTIALS")
CORSMaxAge = viper.GetInt("CORS_MAX_AGE")