diff --git a/frontend/src/terminal.ts b/frontend/src/terminal.ts index cd7c395..dc6d884 100644 --- a/frontend/src/terminal.ts +++ b/frontend/src/terminal.ts @@ -19,7 +19,7 @@ async function main() { const params = new URLSearchParams(window.location.search); let origin: URL if (params.has("host") || params.has("port")) { - origin = new URL(`${params.get("host") || "localhost"}:${params.get("port") || 9999}`) + origin = new URL(`http://${params.get("host") || "localhost"}:${params.get("port") || 9999}`) } else if (__TWEETY_ORIGIN__) { origin = new URL(__TWEETY_ORIGIN__) } else { diff --git a/go.mod b/go.mod index cecfca7..a5c8c76 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.20 require ( github.com/creack/pty v1.1.18 github.com/go-chi/chi/v5 v5.0.10 + github.com/go-chi/cors v1.2.1 github.com/gorilla/websocket v1.5.0 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 @@ -13,7 +14,6 @@ require ( ) require ( - github.com/go-chi/cors v1.2.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect )