const origin = process.env.GIT_HTTP_MOCK_SERVER_ALLOW_ORIGIN const allowHeaders = [ 'accept-encoding', 'accept-language', 'accept', 'access-control-allow-origin', 'authorization', 'cache-control', 'connection', 'content-length', 'content-type', 'dnt', 'git-protocol', 'pragma', 'range', 'referer', 'user-agent', 'x-authorization', 'x-http-method-override', 'x-requested-with', ] const exposeHeaders = [ 'accept-ranges', 'age', 'cache-control', 'content-length', 'content-language', 'content-type', 'date', 'etag', 'expires', 'last-modified', 'pragma', 'server', 'transfer-encoding', 'vary', 'x-github-request-id', 'x-redirected-url', ] const allowMethods = [ 'POST', 'GET', 'OPTIONS' ] const cors = require('micro-cors')({ allowHeaders, exposeHeaders, allowMethods, allowCredentials: false, origin }) module.exports = cors