Skip to content

Protect embedded chat by origin

Sometimes your RWC contains security information and should be opened only from special sites. The Wait for Chat(RWC) Step receives all the necessary information about the parent page. Use this info to protect the chat by origin.

Here's a basic example:

  1. Start building your your Flow with the Wait for Chat (RWC) Step. Note, it has the Merge filed headers.origin. It contains the path with parent page URL.
  2. Add the Check condition Step to your Flow. Use the headers.origin Merge filed in the condition to split the Flow tree and show a different messages for trusted and non-trusted sites. Check condition

WARNING

If you want to use standalone RWC version as a separate application, also include its own RWC URL (for example, https://chat.[ENV].onereach.ai/...) to the condition. Check condition