We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cffbe00 commit df51e16Copy full SHA for df51e16
test/http-server-test.js
@@ -129,7 +129,8 @@ vows.describe('http-server').addBatch({
129
topic: function () {
130
var server = httpServer.createServer({
131
root: root,
132
- cors: true
+ cors: true,
133
+ cors_headers: 'X-Test'
134
});
135
server.listen(8082);
136
this.callback(null, server);
@@ -148,6 +149,9 @@ vows.describe('http-server').addBatch({
148
149
},
150
'status code should be 204': function (err, res) {
151
assert.equal(res.statusCode, 204);
152
+ },
153
+ 'response Access-Control-Allow-Headers should contain X-Test': function (err, res, body) {
154
+ assert.ok(res.headers['Access-Control-Allow-Headers'].split(/\s*,\s*/g).indexOf('X-Test') >= 0, 204);
155
}
156
157
0 commit comments