bug: Can't use Jan's openai server beyond localhost
Closed this issue · 2 comments
BlackCherryCat commented
Version: 0.7.2 through Jan-bin AUR package
Describe the Bug
Even though I set the Server Host to 0.0.0.0, it only works succesfully on localhost
Steps to Reproduce
- Set Host to 0.0.0.0
- Start an openai server through Jan
- Try to obtain models from your LAN IP
Screenshots / Logs
> curl -X 'GET' \
'http://localhost:1337/v1/models' \
-H 'accept: application/json' \
-H 'Authorization: Bearer example'
{"data":[{"created":1,"id":"Jan-v1-4B-Q4_K_M","object":"model","owned_by":"user"}],"object":"list"}⏎
~
> curl -X 'GET' \
'http://192.168.1.30:1337/v1/models' \
-H 'accept: application/json' \
-H 'Authorization: Bearer example'
Invalid host header⏎
~
> curl -X 'GET' \
'http://127.0.0.1:1337/v1/models' \
-H 'accept: application/json' \
-H 'Authorization: Bearer example'
{"data":[{"created":1,"id":"Jan-v1-4B-Q4_K_M","object":"model","owned_by":"user"}],"object":"list"}⏎ Operating System
- MacOS
- Windows
- Linux
github-actions commented
BlackCherryCat commented
I solved it by putting an * in Trusted Hosts as mentioned in #6471 (comment)