Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
add xspace-agent/src/server/middleware/security.ts
oversteppingc289ab8bcf2f
diff --git a/xspace-agent/src/server/middleware/security.ts b/xspace-agent/src/server/middleware/security.tsnew file mode 100644index 000000000..7c0d7c62d--- /dev/null+++ b/xspace-agent/src/server/middleware/security.ts@@ -0,0 +1,28 @@+// SPDX-License-Identifier: Apache-2.0+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent) [§73]++import helmet from "helmet"+import type { RequestHandler } from "express"++export function createSecurityMiddleware(): RequestHandler {+ return helmet({+ contentSecurityPolicy: {+ directives: {+ defaultSrc: ["'self'"],+ scriptSrc: ["'self'", "'unsafe-inline'"],+ styleSrc: ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"],+ fontSrc: ["'self'", "https://fonts.gstatic.com"],+ imgSrc: ["'self'", "data:", "blob:"],+ connectSrc: ["'self'", "ws:", "wss:"],+ frameSrc: ["'none'"],+ objectSrc: ["'none'"],+ baseUri: ["'self'"],+ },+ },+ xFrameOptions: { action: "deny" },+ referrerPolicy: { policy: "strict-origin-when-cross-origin" },+ xContentTypeOptions: true,+ }) as RequestHandler+}++