hapijs / glue

Server composer for hapi.js
Other
245 stars 62 forks source link

"origin" must not be a sparse array #33

Closed mlennie closed 9 years ago

mlennie commented 9 years ago

usinge hapi 10 with node 4 in ubuntu 14. keep getting this error when starting node server. It works on my colleague's mac but not on my ubuntu 14 (which I use inside a docker container base image ubuntu).

image

here's our server code:

var Glue = require('glue');
var routes = require('./config/routes/');
require('dotenv').load();

Glue.compose(require('./config/hapi.js'), function(err, server) {

  // allow server to be used elsewhere
  module.exports = server;

  // setup authentication strategy
  server.auth.strategy('jwt', 'jwt', 'required', {
    key: process.env.JWT_SECRET,
    validateFunc: require('./utils/auth/validateToken'),
    verifyOptions: {
      algorithms: ['HS256']
    }
  });

  // register routes
  server.route(routes.routes);

  // start server
  if (!module.parent) {
    server.start(function(err) {
      if (err) {
        throw err;
      }
      server.log('Server running at:', server.info.uri);
    });
  }
});
lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.