# How to 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 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