ollama/server
Bruce MacDonald cef45feaa4
Add preflight OPTIONS handling and update CORS config (#4086)
* Add preflight OPTIONS handling and update CORS config

- Implement early return with HTTP 204 (No Content) for OPTIONS requests in allowedHostsMiddleware to optimize preflight handling.

- Extend CORS configuration to explicitly allow 'Authorization' headers and 'OPTIONS' method when OLLAMA_ORIGINS environment variable is set.

* allow auth, content-type, and user-agent headers

* Update routes.go
2024-05-08 13:14:00 -07:00
..
envconfig Centralize server config handling 2024-05-05 16:49:50 -07:00
auth.go change github.com/jmorganca/ollama to github.com/ollama/ollama (#3347) 2024-03-26 13:04:17 -07:00
download.go server: provide helpful workaround hint when stalling on pull (#3584) 2024-04-10 16:24:37 -07:00
fixblobs.go server: replace blob prefix separator from ':' to '-' (#3146) 2024-03-14 20:18:06 -07:00
fixblobs_test.go server: replace blob prefix separator from ':' to '-' (#3146) 2024-03-14 20:18:06 -07:00
images.go routes: fix show llava models 2024-05-08 12:43:36 -07:00
layer.go quantize any fp16/fp32 model 2024-05-06 15:24:01 -07:00
manifest.go update list handler to use model.Name 2024-05-07 09:38:45 -07:00
model.go close zip files 2024-05-06 15:27:19 -07:00
modelpath.go validate the format of the digest when getting the model path (#4175) 2024-05-05 11:46:12 -07:00
modelpath_test.go validate the format of the digest when getting the model path (#4175) 2024-05-05 11:46:12 -07:00
prompt.go change github.com/jmorganca/ollama to github.com/ollama/ollama (#3347) 2024-03-26 13:04:17 -07:00
prompt_test.go change github.com/jmorganca/ollama to github.com/ollama/ollama (#3347) 2024-03-26 13:04:17 -07:00
routes.go Add preflight OPTIONS handling and update CORS config (#4086) 2024-05-08 13:14:00 -07:00
routes_test.go update tests 2024-05-06 15:24:01 -07:00
sched.go Skip scheduling cancelled requests, always reload unloaded runners (#4189) 2024-05-06 14:22:24 -07:00
sched_test.go Fix stale test logic 2024-05-06 14:15:37 -07:00
upload.go change github.com/jmorganca/ollama to github.com/ollama/ollama (#3347) 2024-03-26 13:04:17 -07:00