test: middleware/header

This commit is contained in:
DIYgod
2019-01-31 15:12:54 +08:00
parent 2488707242
commit 9afa5049d0
3 changed files with 21 additions and 6 deletions

View File

@@ -2,8 +2,8 @@ const logger = require('../utils/logger');
const config = require('../config');
const headers = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild',
'Access-Control-Allow-Methods': 'PUT, POST, GET, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With',
'Access-Control-Allow-Methods': 'GET',
'Content-Type': 'application/xml; charset=utf-8',
'Cache-Control': `max-age=${config.cacheExpire / 2}`,
};