--request-scripts
- CLI
- --request-scripts
- REST
- CLI only
Controls whether requests may carry --javascript, --javascript-file or --navigator-script. Set forbid to refuse them.
| Where | With forbid |
|---|---|
| Command line | Exits the process with a usage error naming the flag |
--server | Returns HTTP 400 naming the field |
| MCP | Omits both fields from tool schemas and rejects calls that send one |
Request scripts run in the page with its cookies, storage and logged-in session. Set forbid on a server whose callers are not trusted with the pages it reaches, such as an agent reading untrusted content.
A --cdp client evaluates script through the protocol and is outside this flag.
Example
CLI
Run locally
zshot --server --request-scripts forbid