Changes to connection system to support docker
This commit is contained in:
@@ -20,7 +20,7 @@ http {
|
||||
}
|
||||
|
||||
# Proxy SSH socket requests
|
||||
location /ssh-socket.io/ {
|
||||
location /ssh.io/ {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
@@ -30,7 +30,7 @@ http {
|
||||
}
|
||||
|
||||
# Proxy database requests
|
||||
location /database-socket.io/ {
|
||||
location /database.io/ {
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
||||
@@ -371,6 +371,15 @@ function App() {
|
||||
/>
|
||||
{isLaunchpadOpen && <Launchpad onClose={() => setIsLaunchpadOpen(false)} />}
|
||||
|
||||
<LoginUserModal
|
||||
isHidden={isLoginUserHidden}
|
||||
form={loginUserForm}
|
||||
setForm={setLoginUserForm}
|
||||
handleLoginUser={handleLoginUser}
|
||||
setIsLoginUserHidden={setIsLoginUserHidden}
|
||||
setIsCreateUserHidden={setIsCreateUserHidden}
|
||||
/>
|
||||
|
||||
{/* User component */}
|
||||
<User
|
||||
ref={userRef}
|
||||
|
||||
@@ -66,7 +66,7 @@ export const NewTerminal = forwardRef(({ hostConfig, isVisible }, ref) => {
|
||||
? "http://localhost:8081"
|
||||
: "/",
|
||||
{
|
||||
path: "/ssh-socket.io/",
|
||||
path: "/ssh.io/",
|
||||
transports: ["websocket", "polling"],
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,15 +2,15 @@ import { useRef, forwardRef, useImperativeHandle } from "react";
|
||||
import io from "socket.io-client";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
let socket = null;
|
||||
let socket;
|
||||
|
||||
if (socket === null) {
|
||||
if (!socket) {
|
||||
socket = io(
|
||||
window.location.hostname === "localhost"
|
||||
? "http://localhost:8082"
|
||||
: "/",
|
||||
{
|
||||
path: window.location.hostname === "localhost" ? "/" : "/database-socket.io/",
|
||||
path: "/database.io",
|
||||
transports: ["websocket", "polling"],
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user