Courses / Node.js
14. CORS handling with the cors package
Enable and configure Cross-Origin Resource Sharing using the cors middleware.
1 min read Chapter 14 of 48
JavaScript
CORS handling with the cors package
A middleware that tells browsers which other origins are allowed to request your server resources.
"I deployed an API and my browser keeps blocking requests from my frontend."
cors is an Express middleware that sets HTTP Access-Control-Allow-* headers so browsers permit cross-origin requests according to rules you configure.
"I deployed an API and my browser keeps blocking requests from my frontend."
cors is an Express middleware that sets HTTP Access-Control-Allow-* headers so browsers permit cross-origin requests according to rules you configure.