from odoo import http from odoo.http import request class CorsHandler(http.Controller): # This specifically targets the authentication endpoint for CORS @http.route('/web/session/authenticate', type='json', auth="none", cors="*") def authenticate_cors(self, db, login, password, base_location=None): request.session.authenticate(db, login, password) return request.env['ir.http'].session_info()