Skip to content

Instantly share code, notes, and snippets.

@dashawk
Created May 22, 2017 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dashawk/1c0f0707caee2d82f15f265cab3f6f5f to your computer and use it in GitHub Desktop.
Save dashawk/1c0f0707caee2d82f15f265cab3f6f5f to your computer and use it in GitHub Desktop.
/* CORS */
const Hapi = require('hapi');
const server = new Hapi();
server.connection({
host: '0.0.0.0',
port: this.config.webservice_port,
routes: {
cors: {
origin: ['*'],
additionalHeaders: ['token']
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment