mirror of
https://github.com/ollama/ollama.git
synced 2026-04-21 00:05:40 +02:00
allow ollama.com to call inference and info endpoints
- By default allow ollama.com to call inference and info endpoints this can be overridden by setting an OLLAMA_HOSTS env var
This commit is contained in:
@@ -57,6 +57,11 @@ func Host() *url.URL {
|
||||
}
|
||||
}
|
||||
|
||||
// HasCustomOrigins returns true if custom origins are configured. Origins can be configured via the OLLAMA_ORIGINS environment variable.
|
||||
func HasCustomOrigins() bool {
|
||||
return Var("OLLAMA_ORIGINS") != ""
|
||||
}
|
||||
|
||||
// Origins returns a list of allowed origins. Origins can be configured via the OLLAMA_ORIGINS environment variable.
|
||||
func Origins() (origins []string) {
|
||||
if s := Var("OLLAMA_ORIGINS"); s != "" {
|
||||
|
||||
Reference in New Issue
Block a user