diff --git a/.env.example b/.env.example index 9761590..289272e 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -VERSION=0.1.24 +VERSION=0.1.25 # Nest run in docker, change host to database container name DB_HOST=localhost diff --git a/apps/webapp/app/services/sessionStorage.server.ts b/apps/webapp/app/services/sessionStorage.server.ts index ff92c4e..3f58964 100644 --- a/apps/webapp/app/services/sessionStorage.server.ts +++ b/apps/webapp/app/services/sessionStorage.server.ts @@ -5,6 +5,9 @@ import { type AuthUser } from "./authUser"; let SESSION_KEY = "user"; +// Check if origin uses HTTPS +const isHttps = env.CORE_APP_ORIGIN?.startsWith("https://") ?? false; + export const sessionStorage = createCookieSessionStorage<{ [SESSION_KEY]: AuthUser; }>({ @@ -14,7 +17,7 @@ export const sessionStorage = createCookieSessionStorage<{ path: "/", // remember to add this so the cookie will work in all routes httpOnly: true, // for security reasons, make this cookie http only secrets: [env.SESSION_SECRET], - secure: env.NODE_ENV === "production", // enable this in prod only + secure: isHttps, // enable secure cookies only when using HTTPS maxAge: 60 * 60 * 24 * 365, // 7 days }, }); @@ -26,7 +29,7 @@ export const themeStorage = createCookieSessionStorage({ path: "/", httpOnly: true, secrets: [env.SESSION_SECRET], - secure: env.NODE_ENV === "production", + secure: isHttps, // enable secure cookies only when using HTTPS maxAge: 60 * 60 * 24 * 365, // 1 year }, }); diff --git a/apps/webapp/app/trigger/utils/mcp.ts b/apps/webapp/app/trigger/utils/mcp.ts index 340be04..db865f0 100644 --- a/apps/webapp/app/trigger/utils/mcp.ts +++ b/apps/webapp/app/trigger/utils/mcp.ts @@ -121,14 +121,11 @@ export class MCP { } async callTool(name: string, parameters: any) { - console.log(name, parameters); const response = await this.client.callTool({ name, arguments: parameters, }); - console.log(response); - return response; } diff --git a/hosting/docker/.env b/hosting/docker/.env index d973122..6bc3a5e 100644 --- a/hosting/docker/.env +++ b/hosting/docker/.env @@ -1,4 +1,4 @@ -VERSION=0.1.24 +VERSION=0.1.25 # Nest run in docker, change host to database container name DB_HOST=postgres diff --git a/package.json b/package.json index 6291816..4f2c867 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "core", "private": true, - "version": "0.1.24", + "version": "0.1.25", "workspaces": [ "apps/*", "packages/*" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe6e8d8..9ba470c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -532,9 +532,6 @@ importers: eventsource: specifier: ^4.0.0 version: 4.0.0 - exa-js: - specifier: ^1.8.20 - version: 1.8.20(encoding@0.1.13)(ws@8.18.3) execa: specifier: ^9.6.0 version: 9.6.0 @@ -6894,9 +6891,6 @@ packages: engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} hasBin: true - cross-fetch@4.1.0: - resolution: {integrity: sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==} - cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} @@ -7343,10 +7337,6 @@ packages: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} - dotenv@16.4.7: - resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} - engines: {node: '>=12'} - dotenv@16.5.0: resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} engines: {node: '>=12'} @@ -7790,9 +7780,6 @@ packages: evt@2.5.9: resolution: {integrity: sha512-GpjX476FSlttEGWHT8BdVMoI8wGXQGbEOtKcP4E+kggg+yJzXBZN2n4x7TS/zPBJ1DZqWI+rguZZApjjzQ0HpA==} - exa-js@1.8.20: - resolution: {integrity: sha512-FNxoaBOmGyfb4NoWn3Bf5QQGOeKGW7SZ0z4p7qRyoFueH8671XQ6VkYLLriaWSZQ42h7+7O9bAjLXBdYuQ2XMw==} - execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -20046,12 +20033,6 @@ snapshots: dependencies: cross-spawn: 7.0.6 - cross-fetch@4.1.0(encoding@0.1.13): - dependencies: - node-fetch: 2.7.0(encoding@0.1.13) - transitivePeerDependencies: - - encoding - cross-spawn@5.1.0: dependencies: lru-cache: 4.1.5 @@ -20499,8 +20480,6 @@ snapshots: dotenv@16.0.3: {} - dotenv@16.4.7: {} - dotenv@16.5.0: {} dotenv@8.6.0: {} @@ -21248,17 +21227,6 @@ snapshots: run-exclusive: 2.2.19 tsafe: 1.8.5 - exa-js@1.8.20(encoding@0.1.13)(ws@8.18.3): - dependencies: - cross-fetch: 4.1.0(encoding@0.1.13) - dotenv: 16.4.7 - openai: 5.12.2(ws@8.18.3)(zod@3.23.8) - zod: 3.23.8 - zod-to-json-schema: 3.24.5(zod@3.23.8) - transitivePeerDependencies: - - encoding - - ws - execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -23654,11 +23622,6 @@ snapshots: is-inside-container: 1.0.0 wsl-utils: 0.1.0 - openai@5.12.2(ws@8.18.3)(zod@3.23.8): - optionalDependencies: - ws: 8.18.3 - zod: 3.23.8 - openai@5.12.2(ws@8.18.3)(zod@3.25.76): optionalDependencies: ws: 8.18.3