Skip to content

Commit 6711c25

Browse files
authored
Merge pull request #82 from FriendlyCaptcha/self-hosted-endpoint-troubleshooting
Add note about troubleshooting X-Frame-Options for Self-Hosted Endpoint
2 parents dedc9fd + 42a85c4 commit 6711c25

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/guides/self-hosted-endpoint.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,13 @@ location ~ ^/api/v2/captcha/(agent|widget|ping|activate|quote|redeem)(/.*)?$ {
144144
proxy_pass https://global.proxy.frcapi.com;
145145
}
146146
```
147+
148+
## Troubleshooting
149+
150+
### Restrictive `X-Frame-Options`
151+
152+
The Friendly Captcha widget loads in an `iframe`, which means it will not load if your proxied response includes an `X-Frame-Options: DENY` header. If the widget will not load via your Self-Hosted Endpoint, check that any `X-Frame-Options` headers on the proxied responses are permissive enough to allow the `iframe` to load. You can choose one of the following three options.
153+
154+
1. Don't set the `X-Frame-Options` header at all (this is what the Friendly Captcha API does).
155+
2. Set `X-Frame-Options: SAMEORIGIN` if the page and proxied requests have the same origin.
156+
3. Use the `frame-ancestors` directive of the `Content-Security-Policy` header to specifically allow `iframe`s loaded from your Self-Hosted Endpoint origin.

0 commit comments

Comments
 (0)