Skip to content

Commit

Permalink
added cors for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
abarnhard committed Jan 5, 2015
1 parent b33f336 commit 5f01276
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var Hapi = require('hapi'),
server = new Hapi.Server(),
server = new Hapi.Server({connections: {routes: {cors: true}}}),
routes = require('./routes/routes'),
plugins = require('./lib/plugins'),
authentication = require('./lib/authentication');
Expand Down
5 changes: 4 additions & 1 deletion server/routes/config/users/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ module.exports = {
password: Joi.string().min(4).required()
}
},
cors:{origin: ['http://localhost:8100'],credentials: true},
cors:{
origin: ['http://localhost:8100'],
credentials: true
},
auth: false,
handler: function(request, reply){
User.login(request.payload, function(err, user){
Expand Down

0 comments on commit 5f01276

Please sign in to comment.