added setting for max Socket.IO HTTP buffer size
This commit is contained in:
parent
7c85c4a71d
commit
1b8044a8a7
@ -48,13 +48,13 @@ export default {
|
|||||||
companyShort: process.env.DTP_SITE_COMPANY_SHORT || "Colbert",
|
companyShort: process.env.DTP_SITE_COMPANY_SHORT || "Colbert",
|
||||||
name: process.env.DTP_SITE_NAME || "Gadget Code",
|
name: process.env.DTP_SITE_NAME || "Gadget Code",
|
||||||
shortName: process.env.DTP_SITE_NAME || "Gadget Code",
|
shortName: process.env.DTP_SITE_NAME || "Gadget Code",
|
||||||
slogan: process.env.DTP_SITE_SLOGAN || "Self-hosted Agentic Engineering Platform",
|
slogan:
|
||||||
|
process.env.DTP_SITE_SLOGAN || "Self-hosted Agentic Engineering Platform",
|
||||||
description:
|
description:
|
||||||
process.env.DTP_SITE_DESCRIPTION ||
|
process.env.DTP_SITE_DESCRIPTION ||
|
||||||
"Gadget Code - A self-hosted Agentic Engineering Platform (AEP).",
|
"Gadget Code - A self-hosted Agentic Engineering Platform (AEP).",
|
||||||
domain: process.env.DTP_SITE_DOMAIN || "code-dev.g4dge7.com",
|
domain: process.env.DTP_SITE_DOMAIN || "code-dev.g4dge7.com",
|
||||||
domainKey:
|
domainKey: process.env.DTP_SITE_DOMAIN_KEY || "code-dev.g4dge7.com",
|
||||||
process.env.DTP_SITE_DOMAIN_KEY || "code-dev.g4dge7.com",
|
|
||||||
host: process.env.DTP_SITE_HOST || "code-dev.g4dge7.com",
|
host: process.env.DTP_SITE_HOST || "code-dev.g4dge7.com",
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
@ -113,6 +113,12 @@ export default {
|
|||||||
crtFile: process.env.DTP_HTTPS_CRT_FILE,
|
crtFile: process.env.DTP_HTTPS_CRT_FILE,
|
||||||
uploadPath: process.env.DTP_HTTPS_UPLOAD_PATH || "/tmp",
|
uploadPath: process.env.DTP_HTTPS_UPLOAD_PATH || "/tmp",
|
||||||
},
|
},
|
||||||
|
socket: {
|
||||||
|
maxHttpBufferSize: parseInt(
|
||||||
|
process.env.DTP_SOCKET_MAX_HTTP_BUFFER_SIZE || "1048576", // 1MB by default
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
},
|
||||||
frontend: {
|
frontend: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,14 +2,16 @@
|
|||||||
// Copyright (C) 2026 Robert Colbert <rob.colbert@openplatform.us>
|
// Copyright (C) 2026 Robert Colbert <rob.colbert@openplatform.us>
|
||||||
// All Rights Reserved
|
// All Rights Reserved
|
||||||
|
|
||||||
|
import env from "../config/env.ts";
|
||||||
|
|
||||||
import http from "node:http";
|
import http from "node:http";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
import { DisconnectReason, ExtendedError, Socket, Server } from "socket.io";
|
import { DisconnectReason, ExtendedError, Socket, Server } from "socket.io";
|
||||||
|
|
||||||
import { GadgetSocket, SocketSessionType } from "../lib/socket-session.js";
|
import { GadgetSocket, SocketSessionType } from "../lib/socket-session.ts";
|
||||||
import { CodeSession } from "../lib/code-session.js";
|
import { CodeSession } from "../lib/code-session.ts";
|
||||||
import { DroneSession } from "../lib/drone-session.js";
|
import { DroneSession } from "../lib/drone-session.ts";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ClientToServerEvents,
|
ClientToServerEvents,
|
||||||
@ -19,9 +21,9 @@ import {
|
|||||||
SocketData,
|
SocketData,
|
||||||
} from "@gadget/api";
|
} from "@gadget/api";
|
||||||
|
|
||||||
import DroneService from "./drone.js";
|
import DroneService from "./drone.ts";
|
||||||
import SessionService from "./session.js";
|
import SessionService from "./session.ts";
|
||||||
import { DtpService } from "../lib/service.js";
|
import { DtpService } from "../lib/service.ts";
|
||||||
|
|
||||||
type CodeSessionMap = Map<string, CodeSession>;
|
type CodeSessionMap = Map<string, CodeSession>;
|
||||||
type DroneSessionMap = Map<string, DroneSession>;
|
type DroneSessionMap = Map<string, DroneSession>;
|
||||||
@ -62,6 +64,7 @@ class SocketService extends DtpService {
|
|||||||
never,
|
never,
|
||||||
SocketData
|
SocketData
|
||||||
>(httpServer, {
|
>(httpServer, {
|
||||||
|
maxHttpBufferSize: env.socket.maxHttpBufferSize,
|
||||||
cors: {
|
cors: {
|
||||||
origin: "*",
|
origin: "*",
|
||||||
methods: ["GET", "POST"],
|
methods: ["GET", "POST"],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user