diff --git a/server/constants/constants.go b/server/constants/constants.go index 2298de1..48059e1 100644 --- a/server/constants/constants.go +++ b/server/constants/constants.go @@ -13,7 +13,6 @@ var ( JWT_TYPE = "" JWT_SECRET = "" ALLOWED_ORIGINS = []string{} - ALLOWED_CALLBACK_URLS = []string{} AUTHORIZER_URL = "" PORT = "8080" REDIS_URL = "" diff --git a/server/env.go b/server/env.go index 6efd147..8df99ed 100644 --- a/server/env.go +++ b/server/env.go @@ -16,7 +16,7 @@ var Version string // ParseArgs -> to parse the cli flag and get db url. This is useful with heroku button func ParseArgs() { dbURL := flag.String("database_url", "", "Database connection string") - dbType := flag.String("databse_type", "", "Database type, possible values are postgres,mysql,sqlite") + dbType := flag.String("database_type", "", "Database type, possible values are postgres,mysql,sqlite") authorizerURL := flag.String("authorizer_url", "", "URL for authorizer instance, eg: https://xyz.herokuapp.com") flag.Parse() @@ -104,19 +104,6 @@ func InitEnv() { } constants.ALLOWED_ORIGINS = allowedOrigins - allowedCallbackSplit := strings.Split(os.Getenv("ALLOWED_CALLBACK_URLS"), ",") - allowedCallbacks := []string{} - for _, val := range allowedCallbackSplit { - trimVal := strings.TrimSpace(val) - if trimVal != "" { - allowedCallbacks = append(allowedCallbacks, trimVal) - } - } - if len(allowedCallbackSplit) == 0 { - allowedCallbackSplit = []string{"*"} - } - constants.ALLOWED_CALLBACK_URLS = allowedCallbackSplit - ParseArgs() if constants.DATABASE_URL == "" { panic("Database url is required")