@acastellon/cors 中文文档教程
CORS
包含通用最常见配置值的包装器对象 过滤 & 在 Node Express 应用程序中使用的选项。
它使用纯文本文件逐行定义 CORS 允许的请求者。
用法:
const cors = require('@acastellon/cors')('<path/to/whiletlist>');
cors.enableCORS(app);
// where 'app' is the Application Express instance object.
CORS
Wrapper object that contains the generic most common configuration values of filtering & Options to be used in Node Express Applications.
it uses a plain text file to define by line what are the allowed requesters by CORS.
usage:
const cors = require('@acastellon/cors')('<path/to/whiletlist>');
cors.enableCORS(app);
// where 'app' is the Application Express instance object.
更多