@@ -16,7 +16,7 @@ var Version string
1616// ParseArgs -> to parse the cli flag and get db url. This is useful with heroku button
1717func ParseArgs () {
1818 dbURL := flag .String ("database_url" , "" , "Database connection string" )
19- dbType := flag .String ("databse_type " , "" , "Database type, possible values are postgres,mysql,sqlite" )
19+ dbType := flag .String ("database_type " , "" , "Database type, possible values are postgres,mysql,sqlite" )
2020 authorizerURL := flag .String ("authorizer_url" , "" , "URL for authorizer instance, eg: https://xyz.herokuapp.com" )
2121
2222 flag .Parse ()
@@ -104,19 +104,6 @@ func InitEnv() {
104104 }
105105 constants .ALLOWED_ORIGINS = allowedOrigins
106106
107- allowedCallbackSplit := strings .Split (os .Getenv ("ALLOWED_CALLBACK_URLS" ), "," )
108- allowedCallbacks := []string {}
109- for _ , val := range allowedCallbackSplit {
110- trimVal := strings .TrimSpace (val )
111- if trimVal != "" {
112- allowedCallbacks = append (allowedCallbacks , trimVal )
113- }
114- }
115- if len (allowedCallbackSplit ) == 0 {
116- allowedCallbackSplit = []string {"*" }
117- }
118- constants .ALLOWED_CALLBACK_URLS = allowedCallbackSplit
119-
120107 ParseArgs ()
121108 if constants .DATABASE_URL == "" {
122109 panic ("Database url is required" )
0 commit comments