:boom: [Fix] cors issue with hostname, and add docker-compose.yml
Browse files- docker-compose.yml +9 -0
- networks/llm_requester.js +1 -1
docker-compose.yml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: '3'
|
2 |
+
services:
|
3 |
+
your_service:
|
4 |
+
build:
|
5 |
+
context: .
|
6 |
+
dockerfile: Dockerfile
|
7 |
+
ports:
|
8 |
+
- "443:12345"
|
9 |
+
- "12349:12349"
|
networks/llm_requester.js
CHANGED
@@ -36,7 +36,7 @@ export class ChatCompletionsRequester {
|
|
36 |
if (cors_proxy !== null) {
|
37 |
this.cors_proxy = cors_proxy;
|
38 |
} else {
|
39 |
-
this.cors_proxy =
|
40 |
}
|
41 |
this.request_endpoint = concat_urls(
|
42 |
this.cors_proxy,
|
|
|
36 |
if (cors_proxy !== null) {
|
37 |
this.cors_proxy = cors_proxy;
|
38 |
} else {
|
39 |
+
this.cors_proxy = window.location.href.replace(/\/*(:\d+)*\/?$/, "") + ":12349";
|
40 |
}
|
41 |
this.request_endpoint = concat_urls(
|
42 |
this.cors_proxy,
|