docs: Mention CORS requirement in preflight script docs (#6253)

This commit is contained in:
jdolle 2025-01-02 13:03:13 -08:00 committed by GitHub
parent 8483bd506f
commit b90996f56e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -112,3 +112,11 @@ curly braces, for example:
This will replace `{{access_token}}` with the value of the `access_token` environment variable.
<Screenshot>![](./headers.png)</Screenshot>
## CORS
<Callout type="warning">
**Note**: Preflight scripts are ran inside an iframe and due to how browsers have implemented this
feature, the "Origin" header will be `"null"`. If you encounter a CORS error, try whitelisting the
origin `"null"`. This is not recommended for production environments.
</Callout>