Modsecurity, cors configuration in cyberpanel

Hello, I’m having problems with modesecurity and CORS, When modsecurity is enabled calls from scripts on the same server are blocked, with CORS errors on browser inspect console. When modsecurity is off everything works fine. Anyone with experience on this topic? thanks in advance for any help.