This commit is contained in:
Lloyd Brookes
2015-11-13 11:42:16 +00:00
parent 69db357661
commit 28018c32c0
7 changed files with 9 additions and 7 deletions

View File

@ -7,6 +7,7 @@ const serveIndex = require('koa-serve-index')
const morgan = require('koa-morgan')
const compress = require('koa-compress')
const streamLogStats = require('stream-log-stats')
const cors = require('kcors')
/**
* @module local-web-server
@ -31,7 +32,8 @@ function getApp (options) {
const app = new Koa()
// CORS
/* CORS: allow from any origin */
app.use(convert(cors()))
if (options.mime) {
app.use((ctx, next) => {