# Protect embed chat by origin

Sometimes your RWC contains security information and should be opened only from special sites. The `Wait for Chat' step receives all the necessary information about the parent page, that can be used to protect chat by origin. Here's a basic example:

  1. Add Wait for Chat and Check condition steps
  2. Wait for Chat mergeField contains headers.origin path with parent page URL
  3. Use it to split flow three and show a different message for trusted/non-trusted sites Check condition

WARNING

If you want to use standalone RWC version (separated application) you should also include its own RWC URL (e.g. https://chat.[ENV].onereach.ai/...) Check condition

Last Updated: 8/1/2023, 7:32:10 PM