Jump to content
Turcu

Livehehelp Addon and CORS problem

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.

 

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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