Ako vám môžeme pomôcť?

Stručne nám opíšte, o čo ide – ozveme sa vám e-mailom.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Na úvodnú stránku

Security and Content Security Policy

Which entries your Content Security Policy needs for the widget, why it works without an inline script and without unsafe-inline, how it is isolated from your page and which secrets never belong in the browser.

The Content Security Policy

The widget loads no third-party fonts, no tracking pixel and does not run eval. It sets its styles through constructable stylesheets (adoptedStyleSheets) in the shadow DOM; these are not covered by style-src. You therefore need no unsafe-inline and no unsafe-eval.

With the reactive.chat addresses:

Content-Security-Policy:
  script-src 'self' https://cdn.reactive.chat;
  connect-src 'self' wss://ws.reactive.chat https://ws.reactive.chat;
  img-src 'self' data: https:;

With an own domain:

Content-Security-Policy:
  script-src 'self' https://chat.your-company.com;
  connect-src 'self' wss://chat.your-company.com https://chat.your-company.com;
  img-src 'self' data: https:;

The individual entries:

Older browsers without constructable stylesheets (such as Safari before 16.4) fall back to a <style> element, which a strict style-src blocks. The widget works there, but unstyled.

No inline script needed

The installation consists only of a <script src> with attributes. Your own calls (identify, track, open) belong in your own script files or in an inline script with a nonce:

<script nonce="R4nd0mN0nc3">
  ReactiveChat('identify', { userId: '4711', userHash: '…', exp: 1792503600 });
</script>

A template without an inline script is under Identifying visitors.

Subresource Integrity

loader.js has no version number in its name and is updated continuously; an integrity attribute would shut down the chat on the next update. The core is loaded with a content hash in its name (Architecture). If your policy requires SRI, serve loader.js yourself and set data-rc-ws-url (Quick start) – but then updating it is also up to you.

Isolation from your page

Origin check

The chat connection is only accepted from the domains listed in the project under Allowed origins (subdomains included). A third-party page that copies your site key gets origin_denied. If the list is empty, no check takes place – so always enter your domains. Details under Transport.

The site key itself is not a secret; it is in the source of every page.

What never belongs in the browser

Nor in an app, a public repository or the address of a page.

Abuse protection

The server limits connections, frames and messages per connection and per address and blocks on repeated violations (close 1008). Behind your own proxy, it counts per visitor address only if the proxy key is correct – otherwise all visitors share the proxy's address. Figures under Limits and quotas.

Next: Own domain

Posledná aktualizácia: