Skip to content

Commit b96cd40

Browse files
committed
Fixed obsolete response / Added missing if (...)
1 parent 9c1f1c9 commit b96cd40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

samples/Node.js/app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ app.post('/upload', multipartMiddleware, function(req, res) {
2020
if (ACCESS_CONTROLL_ALLOW_ORIGIN) {
2121
res.header("Access-Control-Allow-Origin", "*");
2222
}
23-
res.status(status).send({
24-
'Access-Control-Allow-Origin': '*'
25-
});
23+
res.status(status).send();
2624
});
2725
});
2826

@@ -39,7 +37,9 @@ app.options('/upload', function(req, res){
3937
app.get('/upload', function(req, res) {
4038
flow.get(req, function(status, filename, original_filename, identifier) {
4139
console.log('GET', status);
42-
res.header("Access-Control-Allow-Origin", "*");
40+
if (ACCESS_CONTROLL_ALLOW_ORIGIN) {
41+
res.header("Access-Control-Allow-Origin", "*");
42+
}
4343

4444
if (status == 'found') {
4545
status = 200;

0 commit comments

Comments
 (0)