Support for setting Cross-Origin Resource Sharing (CORS) headers to lws
npm install lws-cors





Support for setting Cross-Origin Resource Sharing (CORS) headers to lws. Wraps @koajs/cors. For usage instructions, see here).
Adds the following options to lws.
``Access-Control-Allow-Origin
--cors.origin string Set a value. Default is the request OriginAccess-Control-Allow-Methods
header.
--cors.allow-methods string Set a value. Default isAccess-Control-Allow-Credentials
"GET,HEAD,PUT,POST,DELETE,PATCH"
--cors.credentials Set this flag to add header.Cross-Origin-Opener-Policy
--cors.opener-policy string Set a value for the header (specify unsafe-
none, same-origin-allow-popups or same-origin).
--cors.embedder-policy string Set a value for the Cross-Origin-Embedder-Policy header (specify unsafe- or
nonerequire-corp).
--cors.private-network-access Set this flag to enable Access-Control-Request-Private-Network support.
```
*
© 2016-23 Lloyd Brookes \<75pound@gmail.com\>.