2026-05-07 18:00:11 -04:00

11 lines
425 B
Python

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()