@xcanwin/manyoyo 5.2.15 → 5.2.18

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.
@@ -1339,13 +1339,18 @@ class PlaywrightPlugin {
1339
1339
  const scenes = this.resolveTargets('all');
1340
1340
  for (const sceneName of scenes) {
1341
1341
  const url = `http://${host}:${this.scenePort(sceneName)}/mcp`;
1342
- this.writeStdout(`claude mcp add --transport http -s user playwright-${sceneName} ${url}`);
1342
+ this.writeStdout(`claude mcp add -t http -s user playwright-${sceneName} ${url}`);
1343
1343
  }
1344
1344
  this.writeStdout('');
1345
1345
  for (const sceneName of scenes) {
1346
1346
  const url = `http://${host}:${this.scenePort(sceneName)}/mcp`;
1347
1347
  this.writeStdout(`codex mcp add playwright-${sceneName} --url ${url}`);
1348
1348
  }
1349
+ this.writeStdout('');
1350
+ for (const sceneName of scenes) {
1351
+ const url = `http://${host}:${this.scenePort(sceneName)}/mcp`;
1352
+ this.writeStdout(`gemini mcp add -t http -s user playwright-${sceneName} ${url}`);
1353
+ }
1349
1354
 
1350
1355
  return 0;
1351
1356
  }
package/lib/web/server.js CHANGED
@@ -1898,14 +1898,13 @@ async function startWebServer(options) {
1898
1898
  const requestOrigin = req.headers.origin;
1899
1899
  if (requestOrigin) {
1900
1900
  const allowedOrigins = new Set();
1901
- if (ctx.serverHost === '0.0.0.0') {
1902
- // 0.0.0.0 监听时,以请求的 Host 头构造允许来源
1903
- const hostHeader = req.headers.host || '';
1904
- if (hostHeader) {
1905
- allowedOrigins.add(`http://${hostHeader}`);
1906
- allowedOrigins.add(`https://${hostHeader}`);
1907
- }
1908
- } else {
1901
+ // 始终以请求的 Host 头构造允许来源,兼容 nginx 等反向代理场景
1902
+ const hostHeader = req.headers.host || '';
1903
+ if (hostHeader) {
1904
+ allowedOrigins.add(`http://${hostHeader}`);
1905
+ allowedOrigins.add(`https://${hostHeader}`);
1906
+ }
1907
+ if (ctx.serverHost !== '0.0.0.0') {
1909
1908
  allowedOrigins.add(`http://${formatUrlHost(ctx.serverHost)}:${listenPort}`);
1910
1909
  if (ctx.serverHost === '127.0.0.1') {
1911
1910
  allowedOrigins.add(`http://localhost:${listenPort}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "5.2.15",
3
+ "version": "5.2.18",
4
4
  "imageVersion": "1.8.1-common",
5
5
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",
6
6
  "keywords": [