CORS problems in GenieACS-NBI (temporary solution found)

Hello everyone, I encountered a problem when trying to use the GenieACS API which would be about CORS (Cross-Origin Resource Sharing) requests, browsers simply block requests coming from unknown sources. As I am new to Node JS, I was not able to change directly in the code, I was only able to change directly in the file present in "/opt/genieacs/dist/bin/genieacs-nbi" (Docker image). In this file, I inserted next to "t.setHeader ("GenieACS-Version", version)" the following text "t.setHeader ("Access-Control-Allow-Origin","*")" and managed to solve my problem, but this is certainly not the correct solution, would anyone know to tell me what would be the correct solution so that I can safely use the GenieACS API? (I’m using version 1.2 of GenieACS)

PS: I tried to add it to the “/lib/nbi.ts” file too, but it didn’t work, do I have to recompile it? how do I recompile GenieACS?