Skip to content

Commit d3e2880

Browse files
committed
Add best practices note for uncommon scenarios
1 parent e095a4f commit d3e2880

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ return <HCaptcha ref={captchaRef} onLoad={onLoad} sitekey={sitekey} {...props} /
198198
|`loadAsync`|Boolean|No|`true`|Set if the script should be loaded asynchronously.|
199199
|`scriptLocation`|Element|No|`document.head`| Location of where to append the script tag. Make sure to add it to an area that will persist to prevent loading multiple times in the same document view. Note: If `null` is provided, the `document.head` will be used.|
200200

201+
Security note: `scriptSource`, `apihost`, `assethost`, `endpoint`, `host`, `imghost`, and `reportapi` control where hCaptcha assets and API requests are loaded from. Avoid passing user-controlled config objects directly into `HCaptcha` props. If these values must come from user-controllable stored config, CMS data, tenant settings, or URL params, validate them against an explicit allowlist before rendering the component.
202+
201203
#### Events
202204

203205
|Event|Params|Description|

0 commit comments

Comments
 (0)