SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
549 stars 124 forks source link

Cors policy does not allow loading over lan #162

Closed Dalethium closed 1 year ago

Dalethium commented 1 year ago

Access to fetch at 'http://192.168.6.222:5100/api/modules' from origin 'http://192.168.6.216:8000' has been blocked by CORS policy: Request header field bypass-tunnel-reminder is not allowed by Access-Control-Allow-Headers in preflight response.

Simple steps to reproduct:

Host sillytavern on one machine, and extras on another, try connecting them.

Cohee1207 commented 1 year ago

You are likely not running extras with --listen flag

Dalethium commented 1 year ago

python server.py --enable-modules=caption,summarize,classify,sd,chromadb --listen --chroma-folder=/chromadb/ --chroma-persist --secure --classification-model=joeddav/distilbert-base-uncased-go-emotions-student --cuda

is my startup command, I am also running via docker.

Cohee1207 commented 1 year ago

Do you have a 5100 port open on your extras host device?

Dalethium commented 1 year ago

loading http://192.168.6.222:5100/ returns {"error":"401: Invalid API key"} showing the port is open, yep.

If this is not reproducable on your end please let me know, I'll investigate further on my end!

Dalethium commented 1 year ago

Fixed this for my local instance in #164, let me know if you need anything else!

Dalethium commented 1 year ago

Fixed by https://github.com/SillyTavern/SillyTavern/commit/359277deb55af62baca5e439bac50fb7f4abd83d