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
Which version of LM Studio?
LM Studio 0.3.9 (Build 3)
Which operating system?
macOS
What is the bug?
When making a CORS request to the openai-like api on a chromium-based browser, the request will fail indicating a CORS error. This seems to be related to the Access-Control-Allow-Private-Networkhttps://wicg.github.io/private-network-access/#headers
This happens when the server is started with the Enable CORS setting enabled. Using a reverse proxy and adding the header with the value true manually seems to solve the issue.
Screenshots
Logs
2025-02-02 23:09:14 [INFO]
[LM STUDIO SERVER] Received OPTIONS request. {}
2025-02-02 23:09:14 [INFO]
[LM STUDIO SERVER] Received OPTIONS request. {}
2025-02-02 23:09:15 [INFO]
[LM STUDIO SERVER] Received OPTIONS request. {}
Chrome console error:
Access to fetch at 'http://localhost:1234/v1/chat/completions' from origin 'https://example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Private-Network' header was present in the preflight response for this private network request targeting the `local` address space.
To Reproduce
Steps to reproduce the behavior:
Launch lmstudio, enable the api server and enable CORS
Make a request to it from a chromium-based browser that would require CORS (file:/// requests won't show the same behavior)
The network logs show an error
The text was updated successfully, but these errors were encountered:
@yagil You can easily reproduce the error by going into the browser console on any domain that isn't local, and running the following line: fetch("http://localhost:1234/v1/chat/completions")
Which version of LM Studio?
LM Studio 0.3.9 (Build 3)
Which operating system?
macOS
What is the bug?
When making a CORS request to the openai-like api on a chromium-based browser, the request will fail indicating a CORS error. This seems to be related to the
Access-Control-Allow-Private-Network
https://wicg.github.io/private-network-access/#headersThis happens when the server is started with the Enable CORS setting enabled. Using a reverse proxy and adding the header with the value
true
manually seems to solve the issue.Screenshots
Logs
Chrome console error:
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: