Saturday, January 28, 2023

92/365: Cross Origin Resource Sharing

 Today when I went to connect the button on my React app to my Express server to get the emails sent, I got an error about Cross Origin Resource Sharing (CORS). This is part of the security implemented into a browser that allows a website to request resources from its own URL, but blocks resources from other URLs unless certain conditions are met. The server must specify which requests it will fulfill with the Access-Control-Allow-Origin header. The cors library handles this easily with Express. Once the origin is allowed, the request goes through and works. 

No comments:

Post a Comment

190: Sablier

 The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...