zeanium-node
Advanced tools
Comparing version 0.6.4 to 0.6.5
{ | ||
"name": "zeanium-node", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"description": "Zeanium for Node.js, simple http server and custome your business.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -48,4 +48,4 @@ /** | ||
}, | ||
getSelectFields: function (fields){ | ||
fields = fields; | ||
getSelectFields: function (inFields){ | ||
var fields = inFields||[]; | ||
var _props = this.getProperties(); | ||
@@ -68,2 +68,3 @@ if(typeof fields == 'function'){ | ||
zn.each(fields, function (field, index){ | ||
field = field.trim(); | ||
if((field).toString().indexOf(' as ')!=-1){ | ||
@@ -78,3 +79,3 @@ _fields.push(field); | ||
if(!_prop){ | ||
return false; | ||
return -1; | ||
} | ||
@@ -81,0 +82,0 @@ _format = _prop.format; |
@@ -77,6 +77,4 @@ /** | ||
if('OPTIONS' == request.method){ | ||
var _name = _package.name + '@' + _package.version, | ||
_origin = this._request._serverRequest.headers.origin || this._request._serverRequest.headers.host || this._request._serverRequest.headers.Host || ''; | ||
response.writeHead(200, { | ||
'Access-Control-Allow-Origin': _origin, | ||
'Access-Control-Allow-Origin': (request.headers.origin || request.headers.host || request.headers.Host || ''), | ||
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, DELETE, PUT', | ||
@@ -86,3 +84,3 @@ 'Access-Control-Allow-Headers': 'Accept,Accept-Charset,Accept-Encoding,Accept-Language,Connection,Content-Type,Cookie,DNT,Host,Keep-Alive,Origin,Referer,User-Agent,X-CSRF-Token,X-Requested-With', | ||
'Access-Control-Max-Age': '3600',//一个小时时间 | ||
'X-Powered-By': _name, | ||
'X-Powered-By': (_package.name + '@' + _package.version), | ||
'Content-Type': 'text/html;charset=utf-8', | ||
@@ -98,3 +96,3 @@ 'Trailer': 'Content-MD5' | ||
} catch (e){ | ||
zn.error('HttpServer.js Line - 61 ' + e.message); | ||
zn.error('HttpServer.js __onRequest error: ' + e.message); | ||
console.log(e.stack); | ||
@@ -101,0 +99,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
249294
5919