11 lines
495 B
JavaScript
11 lines
495 B
JavaScript
import { test } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
|
|
test('Nginx proxies MCP JSON-RPC requests to the authenticated Node endpoint', () => {
|
|
const config = readFileSync(new URL('../nginx.conf', import.meta.url), 'utf8');
|
|
const block = /location\s*=\s*\/mcp\s*\{([\s\S]*?)\n\s*\}/.exec(config)?.[1] || '';
|
|
assert.match(block, /proxy_pass\s+http:\/\/127\.0\.0\.1:3001;/);
|
|
assert.match(block, /client_max_body_size\s+1m;/);
|
|
});
|