You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be related to a problem I have, when I try to connect the Thunderbird-Addon ThunderAI to LocalAI.
The Addon tries to get the models from the LocalAI-instance and in the container-logs I can see the following line: WRN Client error ip=192.168.0.xxx latency=1.571684ms method=OPTIONS status=404 url=/models
CORS needs to be allow-listed for unauthenticated requests (without the API key) otherwise browsers can't use it.
This can be simply done by moving the https://github.com/mudler/LocalAI/blob/07655c0c2e0e5fe2bca86339a12237b69d258636/core/http/app.go#L138C5-L138C16 block before the authorization middleware, or by adding an exception for the
OPTIONS
HTTP method inLocalAI/core/http/middleware/auth.go
Line 83 in 07655c0
The text was updated successfully, but these errors were encountered: