crossdomainxml
Advanced tools
Comparing version 1.0.0 to 1.0.2
19
index.js
'use strict'; | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
@@ -45,7 +46,7 @@ var lodash = require('lodash'); | ||
if (item.secure !== undefined) { | ||
if (!item.secure) { | ||
allowAccessFromTag.attr('secure', item.secure.toString()); | ||
} | ||
if (item.toPorts !== undefined) { | ||
if (!item.toPorts) { | ||
var toPorts = ''; | ||
@@ -77,7 +78,7 @@ if (typeof item.toPorts === 'string' || (typeof item.toPorts === 'number' && isFinite(item.toPorts) && item.toPorts%1 === 0)) { | ||
if (item.secure !== undefined) { | ||
if (!item.secure) { | ||
allowHttpRequestHeadersFromTag.attr('secure', item.secure.toString()); | ||
} | ||
if (item.headers !== undefined) { | ||
if (!item.headers) { | ||
var headers = ''; | ||
@@ -125,10 +126,10 @@ if (typeof item.headers === 'string') { | ||
fs.writeFile(options.dest + 'crossdomain.xml', $.xml(), function (error) { | ||
fs.writeFile(path.join(options.dest, 'crossdomain.xml'), $.xml(), function (error) { | ||
if (error) { | ||
throw error; | ||
} else { | ||
if (callback) { | ||
callback(); | ||
} | ||
} | ||
if (callback) { | ||
callback(); | ||
} | ||
}); | ||
@@ -135,0 +136,0 @@ })(); |
{ | ||
"name": "crossdomainxml", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "Generate crossdomain.xml file and middleware for express/connect framework", | ||
@@ -28,2 +28,2 @@ "license": "MIT", | ||
} | ||
} | ||
} |
7035
144