The learning process was failing to communicate with the gateway because: 1. Gateway was sending 'Strict-Transport-Security' header on HTTP responses 2. Node.js fetch respects HSTS and upgrades subsequent requests to HTTPS 3. Gateway only has HTTP listener (localhost:3103), no HTTPS 4. Result: SSL 'packet length too long' error on second request attempt Solution: Modified registerHSTSMiddleware to only send HSTS header when the connection is already secure (HTTPS or x-forwarded-proto: https). HTTP connections will not get the HSTS header, preventing the forced upgrade.
24 lines
697 B
JSON
24 lines
697 B
JSON
{
|
|
"name": "llm-gateway",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"scripts": {
|
|
"dev": "npm run dev --workspace=packages/gateway",
|
|
"build": "npm run build --workspace=packages/gateway",
|
|
"start": "npm run start --workspace=packages/gateway",
|
|
"learning": "npm run start --workspace=packages/learning",
|
|
"install:all": "npm install",
|
|
"test": "vitest",
|
|
"db:migrate": "bash scripts/init-db.sh",
|
|
"models:pull": "bash scripts/pull-models.sh",
|
|
"ctx-health": "npm run start --workspace=packages/ctx-health",
|
|
"ctx-health:dev": "npm run dev --workspace=packages/ctx-health"
|
|
},
|
|
"dependencies": {
|
|
"jose": "^6.2.2"
|
|
}
|
|
}
|