Skip to content

Commit bf89395

Browse files
authored
feat: support MAXIM_BASE_URL environment variable (#18)
Added support for configuring the Maxim base URL via the `MAXIM_BASE_URL` environment variable. This change allows users to override the default base URL without having to explicitly set it in the configuration object, providing more flexibility in deployment environments.
2 parents 159cff6 + 10e182d commit bf89395

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

maxim.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ func Init(c *MaximSDKConfig) *Maxim {
4444
baseUrl := "https://app.getmaxim.ai"
4545
if c.BaseUrl != nil {
4646
baseUrl = *c.BaseUrl
47+
} else if os.Getenv("MAXIM_BASE_URL") != "" {
48+
baseUrl = os.Getenv("MAXIM_BASE_URL")
4749
}
4850
apiKey := c.ApiKey
4951
if c.ApiKey == "" {

0 commit comments

Comments
 (0)