Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2020-01-07 11:04:42

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,694
Website

28 - The new widget: how to add external webiste

For allow external website to have the new widget (currently in Beta - January 2020) you need to add an .htaccess file on your live chat root folder.
With this you can allow specific website:

Header always Set Access-Control-Allow-Origin "http://website.ext"
Header always Set Access-Control-Allow-Methods: "GET, POST, OPTIONS, PUT, DELETE"
Header always Set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, API-Key, Authorization"

Or all website.

Header always Set Access-Control-Allow-Origin "*"
Header always Set Access-Control-Allow-Methods: "GET, POST, OPTIONS, PUT, DELETE"
Header always Set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, API-Key, Authorization"

If you still have issue maybe your server configuration is blocking the request, check you Apache configuration or your server configuration.
This external article maybe can give some more informations: https://www.ipragmatech.com/enable-cors-using-htaccess/


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#2 2020-02-01 20:48:07

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,694
Website

Re: 28 - The new widget: how to add external webiste

For multiple domains this works for me

SetEnvIf Origin "^http(s)?://(.+\.)?(domain\.ext|subdomain\.domain\.ext)$" origin_is=$0 
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is

but finally this code create issue if visitor visit three different address, subdomains also if allowed widget can be not loaded.
I suggest to use the code for allow all domains:

Header always Set Access-Control-Allow-Origin "*"
Header always Set Access-Control-Allow-Methods: "GET, POST, OPTIONS, PUT, DELETE"
Header always Set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, API-Key, Authorization"

Now an official guide is also available here: https://doc.livehelperchat.com/docs/int … her-domain

Last edited by PeopleInside (2020-04-02 12:27:28)


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

Board footer