Unity WebGL Error Running on Local Server

I built an app that, in order to run, requires the user to authenticate. The idea is to run this app within a web page, with the help of a local server that contains a database to register the users.

When I run the server and run the app in Chrome through Unity's "Build And Run" option, it works perfectly. However, I only managed to run it on Chrome by this way, since clicking the icon generated on the Unity build does not work in this browser. So I decided to run the app through the server, putting the address "http://localhost:port" and although the app opens the login menu, when I try to authenticate through server calls, i got the error that I put in the image.