Helmet can help protect your app from some well-known web vulnerabilities by setting HTTP headers appropriately. Generally, Helmet is just a collection of smaller middleware functions that set security-related HTTP headers.
First, we need to install it.
yarnaddhelmet
Then, still in the main file, use it after enabling CORS.