clave docs

Egress

A site's code can send a request only to the hostnames on its egress list. A new site has an empty list, so its code can send no request at all.

This is about fetch() from the site's own code. Pages, forms, payments and mail do not need the list.

Read the list

GET /v1/sites/{id}/egress

{ "hosts": ["api.example.com"] }

Change the list

The list is egress in the site's clave.site.json, and a publish sets it. Read Site settings.

{ "egress": ["api.example.com", "hooks.example.org"] }

A draft has its own list, from the file on its slot.

A request to a host that is not on the list gets a 403 in the site's code, with a message that names the host.