feat: auto-prefix wss:// if CUSTOM_VITE_WS_URL is just host
Docker Build (ARM64) / Build & Push (push) Successful in 2m2s
Docker Build (ARM64) / Build & Push (push) Successful in 2m2s
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile.canvas
|
||||
args:
|
||||
- CUSTOM_VITE_WS_URL=${CUSTOM_VITE_WS_URL:-wss://excalidraw.forkless.com}
|
||||
- CUSTOM_VITE_WS_URL=${CUSTOM_VITE_WS_URL:-excalidraw.forkless.com}
|
||||
image: celstnblacc/excalidraw-mcp-sentinel-canvas:latest
|
||||
container_name: mcp-excalidraw-canvas
|
||||
ports:
|
||||
|
||||
@@ -435,7 +435,10 @@ function App(): JSX.Element {
|
||||
return
|
||||
}
|
||||
|
||||
const wsUrl = import.meta.env.CUSTOM_VITE_WS_URL || 'wss://excalidraw.forkless.com'
|
||||
let wsUrl = import.meta.env.CUSTOM_VITE_WS_URL || 'wss://excalidraw.forkless.com'
|
||||
if (wsUrl && !wsUrl.startsWith('ws://') && !wsUrl.startsWith('wss://')) {
|
||||
wsUrl = 'wss://' + wsUrl
|
||||
}
|
||||
|
||||
websocketRef.current = new WebSocket(wsUrl)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user