[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:
@@ -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 });
|
||||
Reference in New Issue
Block a user