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",
|
||||
name: 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:
|
||||
process.env.DTP_SITE_DESCRIPTION ||
|
||||
"Gadget Code - A self-hosted Agentic Engineering Platform (AEP).",
|
||||
domain: process.env.DTP_SITE_DOMAIN || "code-dev.g4dge7.com",
|
||||
domainKey:
|
||||
process.env.DTP_SITE_DOMAIN_KEY || "code-dev.g4dge7.com",
|
||||
domainKey: process.env.DTP_SITE_DOMAIN_KEY || "code-dev.g4dge7.com",
|
||||
host: process.env.DTP_SITE_HOST || "code-dev.g4dge7.com",
|
||||
},
|
||||
ai: {
|
||||
@ -113,6 +113,12 @@ export default {
|
||||
crtFile: process.env.DTP_HTTPS_CRT_FILE,
|
||||
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: {
|
||||
port: 5173,
|
||||
},
|
||||
|
||||
@ -2,14 +2,16 @@
|
||||
// Copyright (C) 2026 Robert Colbert <rob.colbert@openplatform.us>
|
||||
// All Rights Reserved
|
||||
|
||||
import env from "../config/env.ts";
|
||||
|
||||
import http from "node:http";
|
||||
import { Types } from "mongoose";
|
||||
|
||||
import { DisconnectReason, ExtendedError, Socket, Server } from "socket.io";
|
||||
|
||||
import { GadgetSocket, SocketSessionType } from "../lib/socket-session.js";
|
||||
import { CodeSession } from "../lib/code-session.js";
|
||||
import { DroneSession } from "../lib/drone-session.js";
|
||||
import { GadgetSocket, SocketSessionType } from "../lib/socket-session.ts";
|
||||
import { CodeSession } from "../lib/code-session.ts";
|
||||
import { DroneSession } from "../lib/drone-session.ts";
|
||||
|
||||
import {
|
||||
ClientToServerEvents,
|
||||
@ -19,9 +21,9 @@ import {
|
||||
SocketData,
|
||||
} from "@gadget/api";
|
||||
|
||||
import DroneService from "./drone.js";
|
||||
import SessionService from "./session.js";
|
||||
import { DtpService } from "../lib/service.js";
|
||||
import DroneService from "./drone.ts";
|
||||
import SessionService from "./session.ts";
|
||||
import { DtpService } from "../lib/service.ts";
|
||||
|
||||
type CodeSessionMap = Map<string, CodeSession>;
|
||||
type DroneSessionMap = Map<string, DroneSession>;
|
||||
@ -62,6 +64,7 @@ class SocketService extends DtpService {
|
||||
never,
|
||||
SocketData
|
||||
>(httpServer, {
|
||||
maxHttpBufferSize: env.socket.maxHttpBufferSize,
|
||||
cors: {
|
||||
origin: "*",
|
||||
methods: ["GET", "POST"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user