--web-bot-auth
- CLI
- --web-bot-auth
- REST
- web_bot_auth
Signs every request a render sends with Web Bot Auth, as the agent at AGENT.
AGENT is the https:// origin that publishes the public keys at /.well-known/http-message-signatures-directory. KEY is the Ed25519 private key, as a PKCS#8 PEM or a JWK:
KEY | Read |
|---|---|
| A file path | Once, when ZShot starts. Command line only |
A data: URI | Once, when ZShot starts |
An http(s) URL | When each render starts, through the IP filter, within 10 seconds and at most 64 KiB |
A key file or data: URI without a usable key exits with code 3. A key URL that cannot be fetched or holds no usable key exits with code 5.
--header cannot set Signature-Agent, Signature-Input or Signature alongside this flag. A request’s web_bot_auth replaces a server’s key for that request.
Example
zshot -f page.png \
--web-bot-auth https://zshot-cli.com=bot-key.pem \
https://zshot-cli.com/example_assets/hello_zshot/{
"url": "https://zshot-cli.com/example_assets/hello_zshot/",
"output_type": "png",
"web_bot_auth": "https://zshot-cli.com=data:application/x-pem-file;base64,LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1DNENBUUF3QlFZREsyVndCQ0lFSUs5cjVqZWJFYzEvT0ErS1A3Qnp5UjlhRndyY0VKYXBFelhWQ3FFRStXQ0cKLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo="
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/hello_zshot/","output_type":"png","web_bot_auth":"https://zshot-cli.com=data:application/x-pem-file;base64,LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1DNENBUUF3QlFZREsyVndCQ0lFSUs5cjVqZWJFYzEvT0ErS1A3Qnp5UjlhRndyY0VKYXBFelhWQ3FFRStXQ0cKLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo="}' \
-o page.png