Skip to content

Commit 07fa8e1

Browse files
committed
fix adding correct ports
1 parent e7596c7 commit 07fa8e1

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

openwebui/backend/dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export CORS_ALLOW_ORIGIN="http://localhost:5173;http://localhost:8080"
2-
PORT="${PORT:-8080}"
1+
export CORS_ALLOW_ORIGIN="${CORS_ALLOW_ORIGIN:-*}"
2+
PORT="${PORT:-8067}"
33
uvicorn open_webui.main:app --port $PORT --host 0.0.0.0 --forwarded-allow-ips '*' --reload

openwebui/src/lib/constants.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { browser, dev } from '$app/environment';
33

44
export const APP_NAME = 'ActionBridge';
55

6-
export const WEBUI_HOSTNAME = browser ? (dev ? `${location.hostname}:8767` : ``) : '';
7-
export const WEBUI_BASE_URL = browser ? (dev ? `http://${WEBUI_HOSTNAME}` : ``) : ``;
6+
// Backend IP for dev environment
7+
const DEV_BACKEND_IP = 'ec2-34-224-7-3.compute-1.amazonaws.com'; // Tu IP de instancia aquí
8+
9+
export const WEBUI_HOSTNAME = browser ? (dev ? `${DEV_BACKEND_IP}:8767` : location.host) : '';
10+
export const WEBUI_BASE_URL = browser ? (dev ? `http://${WEBUI_HOSTNAME}` : `${location.protocol}//${location.host}`) : ``;
811
export const WEBUI_API_BASE_URL = `${WEBUI_BASE_URL}/api/v1`;
912

1013
export const OLLAMA_API_BASE_URL = `${WEBUI_BASE_URL}/ollama`;
@@ -13,6 +16,10 @@ export const AUDIO_API_BASE_URL = `${WEBUI_BASE_URL}/api/v1/audio`;
1316
export const IMAGES_API_BASE_URL = `${WEBUI_BASE_URL}/api/v1/images`;
1417
export const RETRIEVAL_API_BASE_URL = `${WEBUI_BASE_URL}/api/v1/retrieval`;
1518

19+
// These are defined in vite.config.ts via defineConfig.define
20+
declare const APP_VERSION: string;
21+
declare const APP_BUILD_HASH: string;
22+
1623
export const WEBUI_VERSION = APP_VERSION;
1724
export const WEBUI_BUILD_HASH = APP_BUILD_HASH;
1825
export const REQUIRED_OLLAMA_VERSION = '0.1.16';

openwebui/vite.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ export default defineConfig({
1616
]
1717
})
1818
],
19+
server: {
20+
allowedHosts: [
21+
'localhost',
22+
'127.0.0.1',
23+
'dev-langbuilder-app.cloudgeometry.com',
24+
'.cloudgeometry.com'
25+
]
26+
},
1927
define: {
2028
APP_VERSION: JSON.stringify(process.env.npm_package_version),
2129
APP_BUILD_HASH: JSON.stringify(process.env.APP_BUILD_HASH || 'dev-build')

0 commit comments

Comments
 (0)