Jump to content

Livehehelp Addon and CORS problem


Turcu

Recommended Posts

Hello,

I wanted to do a question. I am using the Livehelp Module (Chatstack) and i have a problem for load the chat in the main website. I have this setup:

WHMCS and Addon: https://my.example.com

Main Site: https://www.example.com

When i add the livehelp script in the website, it doesn't work correctly because CORS policy.  If i leave it as default it says:

"No 'Access-Control-Allow-Origin' header is present on the requested resource"

But then if i set Access-Control-Allow-Origin to "https://www.example.com" in https://my.lomahost.com .htaccess, it works a few moments, but then another error come back:

"The 'Access-Control-Allow-Origin' header contains multiple values 'https://www.example.com, https://www.example.com'"

So, the script at some point, is adding header again and is duplicated but i can't know when and how because is encrypted....

Is there some way to fix it? Is possible to make the chat work int this way? I hava tried lots of options and ways without success.

Thank you,

regards.

 

Link to comment
Share on other sites

I was able to fix the issue. Just in case someone has a similar problem, what I added:

Header always unset Access-Control-Allow-Origin

Before setting the header in the .htaccess. Important the always or doesn't work in my case.

Regards.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated