@imenam/mcp-http-gateway 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +5 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -108,6 +108,11 @@ async function main() {
|
|
|
108
108
|
const servers = config.mcpServers ?? {};
|
|
109
109
|
|
|
110
110
|
const app = express();
|
|
111
|
+
if (process.env.TRUST_PROXY) {
|
|
112
|
+
const val = process.env.TRUST_PROXY;
|
|
113
|
+
app.set('trust proxy', val === 'true' || val === '1' ? 1 : val);
|
|
114
|
+
console.log(`[gateway] Trust proxy enabled (TRUST_PROXY=${val})`);
|
|
115
|
+
}
|
|
111
116
|
app.use(express.json({ type: '*/*' }));
|
|
112
117
|
|
|
113
118
|
const globalWindowMin = parseInt(process.env.RATE_LIMIT_GLOBAL_WINDOW_MINUTES ?? '15', 10);
|