{"_id":"@authing/koa-cors","_rev":"2-ad3cc0839d2017c60ca1988eea310e6d","name":"@authing/koa-cors","dist-tags":{"latest":"0.0.18"},"versions":{"0.0.17":{"name":"@authing/koa-cors","version":"0.0.17","description":"CORS middleware for Koa","main":"index.js","scripts":{"test":"mocha --harmony test"},"repository":{"type":"git","url":"git+https://github.com/evert0n/koa-cors.git"},"keywords":["cors","koa","koajs"],"author":{"name":"Everton Yoshitani"},"license":"MIT","bugs":{"url":"https://github.com/evert0n/koa-cors/issues"},"homepage":"https://github.com/evert0n/koa-cors","devDependencies":{"koa":"^0.18.0","chai":"^2.0.0","mocha":"^2.1.0","superagent":"^0.21.0"},"directories":{"example":"examples","test":"test"},"gitHead":"d2e06f73769655e53c09529ed8fda0e0fff0edca","_id":"@authing/koa-cors@0.0.17","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"authing","email":"xieyang@dodora.cn"},"dist":{"integrity":"sha512-99fvg2+v3zY9pYHK0EWulpbB+gITmASw3RkKQxA8J7PxlN0WqHjmbTanI8qSdJbKbg7Mw8nG3AsqCNINw5yewQ==","shasum":"1274221c5b0774af46a1d26dd16b47392beb2c05","tarball":"https://registry.npmjs.org/@authing/koa-cors/-/koa-cors-0.0.17.tgz","fileCount":10,"unpackedSize":15523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpr9/CRA9TVsSAnZWagAA5+wQAJe9/PNaqNyxr7awTW+7\n310opNCxGFyn3yXNJXrXxTUEpAeQzS/HndYTfx6G9pMopcm5QypmDi1pNDd7\nRfGGO4sz/D6A91TYOoFHsDAvs0OSj5k7kcMS7fWjNBYRafQgKZDwUuGvlxOT\nrf98nSO+ttqT00J7dduhuqzb90/tRrkwgsynU/6TGTJwTFHKbigj4QJUeqdn\nHM5xB9yYoYMufPy5Ns3pQDQYzqr/L+Vrqybquoq42lYsr6zptFqRRpEvetRV\n1ml/oFm1VvOU4jmJT3F6a3SuG5tKnlreuPa+vsWRcH80mtzsWdk8BeS6rA5A\nrzm4436dC6BzeHfC6aVHH3XRCuGhUGLKf13c/19l1twWATPmVUzX9tFsRqbn\nEVhtyhr5mReo77y9I8KW6Otjl+lJr3cBEDegi9OQTi2ZsYbLykX7lH+aJ5/8\noH4EYAGRyln2RtRWCPRTRuyc2ZBFoWleRyExyUpwWm6fBH+uzMovIQyJpmCm\nk66t/+Dlb9B9hVxOOxEpFx8BRn7W6A38EacqIaf9IETlcwi2OMD3LmtTgI8N\n4uR4uGQFJP6q/vVwh0DuupKAlBNIKDRUEaQt2otepOVE4PiPSjAqTAwpO9s/\ni82kOfdBKp4zGU6Yp8YkerjUsHf2Oue5stYdTViMTOgHP3Y/rHKfh59UTND7\nz3/B\r\n=Pfik\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGakqAK0kagCkMUVJVmOBUtMgLGrV9o9/X8lsXX5mJM6AiEA3/w+4zuw/0UhUPv70e4clDANn4vz4T5fbRMWcVQboWw="}]},"maintainers":[{"name":"authing","email":"xieyang@dodora.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-cors_0.0.17_1554431870932_0.3981162363197859"},"_hasShrinkwrap":false},"0.0.18":{"name":"@authing/koa-cors","version":"0.0.18","description":"CORS middleware for Koa","main":"index.js","scripts":{"test":"mocha --harmony test"},"repository":{"type":"git","url":"git+https://github.com/Authing/koa-cors.git"},"keywords":["cors","koa","koajs"],"author":{"name":"Everton Yoshitani"},"license":"MIT","bugs":{"url":"https://github.com/evert0n/koa-cors/issues"},"homepage":"https://github.com/evert0n/koa-cors","devDependencies":{"koa":"^0.18.0","chai":"^2.0.0","mocha":"^2.1.0","superagent":"^0.21.0"},"directories":{"example":"examples","test":"test"},"gitHead":"fe01edc29680c8d7da02e4559a5337e6072b4c16","_id":"@authing/koa-cors@0.0.18","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"vincent15","email":"yelexin@hotmail.com"},"dist":{"integrity":"sha512-LafcgLxpuhxhUntU2EFXbqykcLiuHXlLuGuO9BY0Pa7forJ9WBTNsblX6hQ28L27BkHdAUvgjXFuhzYcpKRMXw==","shasum":"ce8655535874f1ff45dff38b2b69d66dca8102f2","tarball":"https://registry.npmjs.org/@authing/koa-cors/-/koa-cors-0.0.18.tgz","fileCount":10,"unpackedSize":15523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpwlUCRA9TVsSAnZWagAAaX4P/2Dn9g8qX+jWXc8JaLXp\nBEj/S0Fj+6YLF1ozP59wVoLikppYeAkYvVdVte/5pnrxjiYHatPoTjaOYIiX\nEcam8xz9bnO0N8QarL+m6E46Bb/n1V8owxezWJ1mHUv8wibEb1y+4uOt+q+8\n3rg73vBfT1l9+L2t8G+LeFNd5P/z5U/xxRtMTjZ8doAJ157I59Ltt0w+57Fj\nVAyANChN4yAFt2YSsy44HgrzbAAD4hGYlefy9x525EQ/DgCTNimDtTxcOM6v\nVjo4ieZ69mo8hA7MQpgdwqLRjI49M2MyWVZwqIcZ5fH5XCbFVU+511KUwM7J\nFI380YyWs5sQ6ZHG0e3cg2d1i/TmA0iHIcHqRDXfi5rc/mVqr8+oZepLSxGy\ngXxWbu/fvd7Ou5LYvUF5+Ixq9Qk+myde7a8AoF3x2M2KSZmMrtqpZAeHHFen\nsBI2dtMgQe+PKfyHSTmpsajP2sMWRQ1ZK0IUCOD3dIkiwS4OirhCjNLJNMfO\nmFUCqSxmt6zxrNZXgtfvIa7kOjxaBg90Az2nQ6ZhR5rOxAdfQOodYSFZNP2Z\noake/1Gxf0zDDuPLdE2MwT3rZW5FoE86SP8r4xSx0n0lZ64BJV4sQ3+h5QsV\nbdpvDeGjuzJ+WtKOB4dZ6rCQh9koanVuTkn1lVbo0SQipt4jBvXaV+aRoT30\n/irM\r\n=ZdiH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvxsIIsJM6Zi7ZUnu3xun8FJDZAFnx5H1pA8oJopIwBAiBlwUBgnxVXf0vVnXmER4OYCuVgl+fCMi+QHQ/HXiZOZg=="}]},"maintainers":[{"name":"authing","email":"xieyang@dodora.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-cors_0.0.18_1554450771651_0.06706750235742409"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-05T02:37:50.740Z","0.0.17":"2019-04-05T02:37:51.060Z","modified":"2022-04-04T16:31:50.190Z","0.0.18":"2019-04-05T07:52:51.768Z"},"maintainers":[{"name":"authing","email":"xieyang@dodora.cn"}],"description":"CORS middleware for Koa","homepage":"https://github.com/evert0n/koa-cors","keywords":["cors","koa","koajs"],"repository":{"type":"git","url":"git+https://github.com/Authing/koa-cors.git"},"author":{"name":"Everton Yoshitani"},"bugs":{"url":"https://github.com/evert0n/koa-cors/issues"},"license":"MIT","readme":"koa-cors\n========\n\nCORS middleware for Koa\n\nInspired by the great [node-cors](https://github.com/troygoode/node-cors) module.\n\n## Installation (via [npm](https://npmjs.org/package/koa-cors))\n\n```bash\n$ npm install @authing/koa-cors\n```\n\n## Usage\n\n```javascript\nvar koa = require('koa');\nvar route = require('koa-route');\nvar cors = require('koa-cors');\nvar app = koa();\n\napp.use(cors());\n\napp.use(route.get('/', function() {\n  this.body = { msg: 'Hello World!' };\n}));\n\napp.listen(3000);\n```\n\n## Options\n\n### origin\n\nConfigures the **Access-Control-Allow-Origin** CORS header. Expects a string\n(ex: http://example.com). Set to `true` to reflect the\n[request origin](http://tools.ietf.org/html/draft-abarth-origin-09), as defined\nby `req.header('Origin')`. Set to `false` to disable CORS. Can also be set to a\nfunction, which takes the request as the first parameter.\n\n### expose\n\nConfigures the **Access-Control-Expose-Headers** CORS header. Expects a\ncomma-delimited string (ex: 'WWW-Authenticate,Server-Authorization') or an array\n(ex: `['WWW-Authenticate', 'Server-Authorization']`). Set this to pass the\nheader, otherwise it is omitted.\n\n### maxAge\n\nConfigures the **Access-Control-Max-Age** CORS header. Set to an integer to pass\nthe header, otherwise it is omitted.\n\n### credentials\n\nConfigures the **Access-Control-Allow-Credentials** CORS header. Set to `true`\nto pass the header, otherwise it is omitted.\n\n### methods\n\nConfigures the **Access-Control-Allow-Methods** CORS header. Expects a\ncomma-delimited string (ex: 'GET,PUT,POST') or an array (ex: `['GET', 'PUT',\n'POST']`).\n\n### headers\nConfigures the **Access-Control-Allow-Headers** CORS header. Expects a\ncomma-delimited string (ex: 'Content-Type,Authorization') or an array (ex:\n`['Content-Type', 'Authorization']`). If not specified, defaults to reflecting\nthe headers specified in the request's **Access-Control-Request-Headers**\nheader.\n\n\nFor details on the effect of each CORS header,\n[read this article on HTML5 Rocks](http://www.html5rocks.com/en/tutorials/cors/).\n\n\n## License\n\n[MIT License](http://www.opensource.org/licenses/mit-license.php)\n\n","readmeFilename":"README.md"}