Gitlab Pages problem with CORS

Hello

this might be a silly question as I am very new to all the web stuff. However, I built a prototype that I wanted to deploy as a gitlab page for us to test some ideas. When I build and serve the project locally everything works as intended. When I commit and deploy the website, the pipeline is successfully finished and the page is accessible as expected. Unfortunately, the site does not work as intended because apparently the associated javascript files are blocked:

Access to script at 'https://projects.gitlab.io/auth?
...
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there a simple enough explanation/fix of the problem?