feat: add --(allowed|blocked)-origins (#319)

Useful to limit the agent when using the playwright-mcp server with an
agent in auto-invocation mode.

Not intended to be a security feature.
This commit is contained in:
Ross Wollman
2025-05-05 11:28:14 -07:00
committed by GitHub
parent 4694d60fc5
commit 42faa3ccf8
6 changed files with 149 additions and 0 deletions

12
config.d.ts vendored
View File

@@ -94,6 +94,18 @@ export type Config = {
*/
outputDir?: string;
network?: {
/**
* List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
*/
allowedOrigins?: string[];
/**
* List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
*/
blockedOrigins?: string[];
};
/**
* Configuration for specific tools.
*/