{"_id":"egg-jsonp","_rev":"1212434","name":"egg-jsonp","description":"jsonp support for egg","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"time":{"modified":"2021-10-13T05:46:07.000Z","created":"2017-01-23T06:03:26.254Z","2.0.0":"2017-11-11T00:44:23.154Z","1.2.2":"2017-11-10T11:09:34.506Z","1.2.1":"2017-10-11T04:25:25.363Z","1.2.0":"2017-10-11T04:11:56.773Z","1.1.2":"2017-07-21T05:49:21.286Z","1.1.1":"2017-06-04T15:00:50.215Z","1.1.0":"2017-06-01T08:16:05.113Z","1.0.0":"2017-01-23T06:03:26.254Z"},"users":{},"author":{"name":"dead-horse"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"versions":{"2.0.0":{"name":"egg-jsonp","version":"2.0.0","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["app","lib","config"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.2.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.10.1","egg":"next","egg-bin":"^4.3.5","egg-ci":"^1.8.0","egg-mock":"^3.13.1","eslint":"^4.10.0","eslint-config-egg":"^5.1.1","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=8.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov && egg-bin pkgfiles --check","autod":"autod"},"ci":{"version":"8, 9"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"f19c6436be1b3a71127b342ad07dbb1bac861efe","_id":"egg-jsonp@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"d0145faa48b5422681883430421e7c245897191f","size":4766,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-2.0.0.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-2.0.0.tgz_1510361062015_0.6972786979749799"},"directories":{},"publish_time":1510361063154,"_hasShrinkwrap":false,"_cnpm_publish_time":1510361063154},"1.2.2":{"name":"egg-jsonp","version":"1.2.2","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["app","lib","config"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.2.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.9.0","egg":"^1.8.0","egg-bin":"^4.3.2","egg-ci":"^1.8.0","egg-mock":"^3.12.1","eslint":"^4.7.1","eslint-config-egg":"^5.1.1","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov && egg-bin pkgfiles --check","autod":"autod"},"ci":{"version":"6, 7, 8"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"705ffcb3972deebddcc450c8c203a1db0090eba1","_id":"egg-jsonp@1.2.2","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"7ef2b62fca1332f3c9f5b748841b3a7409d8432d","size":4669,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.2.2.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-1.2.2.tgz_1510312173433_0.49580552405677736"},"directories":{},"publish_time":1510312174506,"_cnpm_publish_time":1510312174506,"_hasShrinkwrap":false},"1.2.1":{"name":"egg-jsonp","version":"1.2.1","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["app","lib","config"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.2.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.9.0","egg":"^1.8.0","egg-bin":"^4.3.2","egg-ci":"^1.8.0","egg-mock":"^3.12.1","eslint":"^4.7.1","eslint-config-egg":"^5.1.1","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"ci":{"version":"6, 7, 8"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"dd2b2acb3a9c37685122156095e087a0a1af6825","_id":"egg-jsonp@1.2.1","_npmVersion":"5.4.2","_nodeVersion":"8.4.0","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"41827a91d8a4f333347fd40821acb5c5bc668fc0","size":4490,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.2.1.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-1.2.1.tgz_1507695925256_0.8393333528656512"},"directories":{},"publish_time":1507695925363,"_hasShrinkwrap":false,"_cnpm_publish_time":1507695925363},"1.2.0":{"name":"egg-jsonp","version":"1.2.0","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["app","config"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.2.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.9.0","egg":"^1.8.0","egg-bin":"^4.3.2","egg-ci":"^1.8.0","egg-mock":"^3.12.1","eslint":"^4.7.1","eslint-config-egg":"^5.1.1","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"ci":{"version":"6, 7, 8"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"ff0bb670e683a0160787cfb47ab8819e74599ee8","_id":"egg-jsonp@1.2.0","_npmVersion":"5.4.2","_nodeVersion":"8.4.0","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"52fb96f1877f75862f4d269a7951429850e894b8","size":4351,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.2.0.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-1.2.0.tgz_1507695116689_0.7356865126639605"},"directories":{},"publish_time":1507695116773,"_hasShrinkwrap":false,"_cnpm_publish_time":1507695116773},"1.1.2":{"name":"egg-jsonp","version":"1.1.2","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["index.js","app.js","agent.js","config","app","lib"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.0.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.4.0","egg-bin":"^3.4.1","egg-ci":"^1.6.0","egg-mock":"^3.7.1","eslint":"^3.19.0","eslint-config-egg":"^4.2.0","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"ci":{"version":"6, 7, 8"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"1b57c50e10ca20b05e1109aa76424cdac65a73aa","_id":"egg-jsonp@1.1.2","_shasum":"d81806eea288d25eb64b4e920e7883b3f8e6dfa5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"8.0.0","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"d81806eea288d25eb64b4e920e7883b3f8e6dfa5","size":3995,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.1.2.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-1.1.2.tgz_1500616161184_0.5169406242202967"},"directories":{},"publish_time":1500616161286,"_hasShrinkwrap":false,"_cnpm_publish_time":1500616161286},"1.1.1":{"name":"egg-jsonp","version":"1.1.1","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["index.js","app.js","agent.js","config","app","lib"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.0.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.4.0","egg-bin":"^3.4.1","egg-ci":"^1.6.0","egg-mock":"^3.7.1","eslint":"^3.19.0","eslint-config-egg":"^4.2.0","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"ci":{"version":"6, 7, 8"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"41bed41c2d9b3c5edf6998fb77605e95569a8f49","_id":"egg-jsonp@1.1.1","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"4449877883a6d6213db4c4aafc1ac6b6c7249232","size":3948,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.1.1.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-1.1.1.tgz_1496588450140_0.25652094720862806"},"directories":{},"publish_time":1496588450215,"_hasShrinkwrap":false,"_cnpm_publish_time":1496588450215},"1.1.0":{"name":"egg-jsonp","version":"1.1.0","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["index.js","app.js","agent.js","config","app","lib"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.0.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.4.0","egg-bin":"^3.4.1","egg-ci":"^1.6.0","egg-mock":"^3.7.1","eslint":"^3.19.0","eslint-config-egg":"^4.2.0","supertest":"^3.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"ci":{"version":"6, 7, 8"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"8e27cb38c4d01c57c6cce913e87d3ff208a01e4d","_id":"egg-jsonp@1.1.0","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"dist":{"shasum":"7dc79754640b3e698516cd1f86e7d7e336819111","size":3903,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.1.0.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-jsonp-1.1.0.tgz_1496304965048_0.6430140428710729"},"directories":{},"publish_time":1496304965113,"_cnpm_publish_time":1496304965113,"_hasShrinkwrap":false},"1.0.0":{"name":"egg-jsonp","version":"1.0.0","description":"jsonp support for egg","eggPlugin":{"name":"jsonp","optionalDependencies":["security"]},"files":["index.js","app.js","agent.js","config","app","lib"],"keywords":["egg","egg-plugin","jsonp","security"],"dependencies":{"is-type-of":"^1.0.0","jsonp-body":"^1.0.0"},"devDependencies":{"autod":"^2.7.1","egg":"^0.8.0","egg-bin":"^1.10.0","egg-ci":"^1.1.0","egg-mock":"^2.0.0","eslint":"^3.13.1","eslint-config-egg":"^3.2.0","supertest":"^2.0.1","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-jsonp.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-jsonp#readme","author":{"name":"dead-horse"},"license":"MIT","boilerplate":{"name":"egg-boilerplate-plugin","version":"1.7.0","description":"boilerplate for egg plugin","repository":{"type":"git","url":"git@github.com:eggjs/egg-boilerplate-plugin.git"},"homepage":"https://github.com/eggjs/egg-boilerplate-plugin"},"gitHead":"fd71eb84bc00a8663850fbe20f11b3845fabbd46","_id":"egg-jsonp@1.0.0","_shasum":"f90419dadd534c8b5ce40f576971b19fcc79b835","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.9.1","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"f90419dadd534c8b5ce40f576971b19fcc79b835","size":3797,"noattachment":false,"key":"/egg-jsonp/-/egg-jsonp-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/egg-jsonp/download/egg-jsonp-1.0.0.tgz"},"maintainers":[{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/egg-jsonp-1.0.0.tgz_1485151406040_0.6114350676070899"},"directories":{},"publish_time":1485151406254,"_cnpm_publish_time":1485151406254,"_hasShrinkwrap":false}},"readme":"# egg-jsonp\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/egg-jsonp.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/egg-jsonp\n[travis-image]: https://img.shields.io/travis/eggjs/egg-jsonp.svg?style=flat-square\n[travis-url]: https://travis-ci.org/eggjs/egg-jsonp\n[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-jsonp.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/eggjs/egg-jsonp?branch=master\n[david-image]: https://img.shields.io/david/eggjs/egg-jsonp.svg?style=flat-square\n[david-url]: https://david-dm.org/eggjs/egg-jsonp\n[snyk-image]: https://snyk.io/test/npm/egg-jsonp/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/egg-jsonp\n[download-image]: https://img.shields.io/npm/dm/egg-jsonp.svg?style=flat-square\n[download-url]: https://npmjs.org/package/egg-jsonp\n\nAn egg plugin for jsonp support.\n\n## Install\n\n```bash\n$ npm i egg-jsonp --save\n```\n\n## Usage\n\n```js\n// {app_root}/config/plugin.js\nexports.jsonp = {\n  enable: true,\n  package: 'egg-jsonp',\n};\n```\n\n## Configuration\n\n* {String|Array} callback - jsonp callback method key, default to `[ '_callback', 'callback' ]`\n* {Number} limit - callback method name's max length, default to `50`\n* {Boolean} csrf - enable csrf check or not. default to false\n* {String|RegExp|Array} whiteList - referrer white list\n\nif whiteList's type is `RegExp`, referrer must match `whiteList`, pay attention to the first `^` and last `/`.\n\n```js\nexports.jsonp = {\n  whiteList: /^https?:\\/\\/test.com\\//,\n}\n// matchs referrer:\n// https://test.com/hello\n// http://test.com/\n```\n\nif whiteList's type is `String` and starts with `.`:\n\n```js\nexports.jsonp = {\n  whiteList: '.test.com',\n};\n// matchs domain test.com:\n// https://test.com/hello\n// http://test.com/\n\n// matchs subdomain\n// https://sub.test.com/hello\n// http://sub.sub.test.com/\n```\n\nif whiteList's type is `String` and not starts with `.`:\n\n```js\nexports.jsonp = {\n  whiteList: 'sub.test.com',\n};\n// only matchs domain sub.test.com:\n// https://sub.test.com/hello\n// http://sub.test.com/\n```\n\nwhiteList also can be an array:\n\n```js\nexports.jsonp = {\n  whiteList: [ '.foo.com', '.bar.com' ],\n};\n```\n\nsee [config/config.default.js](https://github.com/eggjs/egg-jsonp/blob/master/config/config.default.js) for more detail.\n\n## API\n\n* ctx.acceptJSONP - detect if response should be jsonp, readonly\n\n## Example\n\nIn `app/router.js`\n\n```js\n// Create once and use in any router you want to support jsonp.\nconst jsonp = app.jsonp();\napp.get('/default', jsonp, 'jsonp.index');\napp.get('/another', jsonp, 'jsonp.another');\n\n// Customize by create another jsonp middleware with specific sonfigurations.\napp.get('/customize', app.jsonp({ callback: 'fn' }), 'jsonp.customize');\n```\n\n## Questions & Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues).\n\n## License\n\n[MIT](https://github.com/eggjs/egg-jsonp/blob/master/LICENSE)\n\n","_attachments":{},"homepage":"https://github.com/eggjs/egg-jsonp#readme","bugs":{"url":"https://github.com/eggjs/egg/issues"},"license":"MIT"}