连接CORS
已弃用! 使用代替
支持用于Node.JS的Connect“预检” OPTIONS请求的CORS模块
安装
npm install connect-cors
用法
var Connect = require ( 'connect' )
, CORS = require ( 'connect-cors' )
, options = { }
, server
;
server = Connect . createServer (
// uses reasonable defaults when no options are given
CORS ( options )
, function ( req , res ) {
res . writeHead ( 200 , { 'Content-Type' : 'text/plai
评论0
最新资源