[FIX] im_livechat: fix cors error on embed livechat

Before this commit, starting a page with the livechat embed
in another origin than Odoo would have resulted in an CORS
error being shown due to the `bootstrap_translation` route
being called in response to the legacy `web.session` setup.

This commit restore the legacy session as it was before [1].

[1]: https://github.com/odoo/odoo/pull/122834

closes odoo/odoo#125565

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
tsm-odoo
2023-06-20 15:58:20 +02:00
parent af5d5a2b4f
commit f33fcdf8c6
2 changed files with 6 additions and 1 deletions
-1
View File
@@ -106,7 +106,6 @@ Help your customers with this chat, and analyse their feedback.
('remove', 'web/static/src/legacy/js/common_env.js'),
'web/static/src/views/fields/formatters.js',
'web/static/src/views/fields/file_handler.*',
'web/static/src/legacy/js/services/session.js',
'bus/static/src/bus_parameters_service.js',
('remove', 'bus/static/src/services/assets_watchdog_service.js'),
@@ -0,0 +1,6 @@
/* @odoo-module alias=web.session */
import Session from "web.Session";
import { serverUrl } from "@im_livechat/embed/livechat_data";
export default new Session(undefined, serverUrl, { use_cors: true });