Skip to content

Commit

Permalink
add editorConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonPuko committed Nov 25, 2016
1 parent 7e8e246 commit fe83369
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
@@ -0,0 +1,7 @@
root = true

[*]
end_of_line = lf
insert_final_newline = false
indent_style = space
indent_size = 2
18 changes: 9 additions & 9 deletions src/main.js
Expand Up @@ -45,15 +45,15 @@ var oauth = OAuthServer({
});

var set_cors_headers = function (req, res, next) {
if ('OPTIONS' === req.method) {
res.set({
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, Content-Type, Accept, Authorization',
'Access-Control-Max-Age': 300
});
return res.send(204);
}
if ('OPTIONS' === req.method) {
res.set({
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, Content-Type, Accept, Authorization',
'Access-Control-Max-Age': 300
});
return res.send(204);
}
else {
res.set({'Access-Control-Allow-Origin': '*'});
next();
Expand Down

0 comments on commit fe83369

Please sign in to comment.