
ShawnC.60679 (Customer) asked a question.
Any security risks for enabling "http://localhost" as a trusted origin to enable CORS?
I'm building my own SPA (React) and need this enabled while I develop the authentication portion. Are there any security risks in adding http://localhost:{my_port_number} to the list of trusted origins?

Hi. This is definitely not recommended in a production tenant.
You should only use this for testing purposes only in a lower tenant or a free developer account that does not impact your work environment.
Having localhost registered as a Trusted Origin means that any browser application running on localhost with the given port can silently act on behalf of the user signed in.
That I would not recommend.
Hi Razvan, thank you for the response. That is helpful.
However, let's say I register a trusted tenant as "https://myapp.mycompany.com" for my app.
Couldn't a hacker simply map this to their localhost in their /etc/hosts file and gain the same functionality?
Thanks!
Can anybody further elaborate on the security implications for enabling "http://localhost" as a trusted origin in CORS?