HowTo: Use a subdomain to access Contact Us or WebChat

Expand / Collapse
 

HowTo: Use a subdomain to access Contact Us or WebChat


Article ID: 52440 - Last Review: May 30, 2016

QUESTION

How can I use a sub-domain to access the webchat or contact us applications?  



ANSWER

Additional steps are required in order to ensure no security errors regarding same origin access block access.

The simplest solution to implement is utilizing CORS (Cross Origin Resource Sharing) by including the following header as accepted on your webserver: Access-Control-Allow-Origin.  Set the value of this header to be that of the subdomain (or domains) you wish to accept on your site.  For example, if your site was www.mysite.com but you wanted to use chat.mysite.com to access the webchat, then set this headers value to "chat.mysite.com".   You can also include a couple other headers to allow for more control over what is permitted as well ensure full functionality of MiCC features when used either via a sub-domain or separate domain completely.  These are :

  • Access-Control-Allow-Headers 
  • Access-Control-Allow-Methods

Setting them as follows:

Access-Control-Allow-Headers with values of "Origin, X-Requested-With, Content-Type, Accept" and Access-Control-Allow-Methods with values of "GET, POST, PUT,  OPTIONS" will allow for maximum flexibility.

As with any change to configuration review  your companies security policies and ensure you understand what it is you are changing.  

For information on how to set http headers, please review the documentation for the given webserver you are using to host your website.


 

APPLIES TO

MCC Version 8.X and newer 

Keywords: sub domain subdomain sub-domain CORS contact us webchat



Rate this Article:
     

Add Your Comments


Name: *
Email Address:
Web Address:
Verification Code:
*
 

Details
Last Modified:Monday, May 30, 2016
Last Modified By: AndrewMontpetit
Type: HOWTO
Article not rated yet.
Article has been viewed 6,875 times.
Options