{"_id":"@blubox/cors","_rev":"6-362e5af15ae26c68d58e04d16e1f2446","name":"@blubox/cors","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@blubox/cors","version":"0.0.1","description":"Blubox CORS","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/cors","license":"MIT","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.0.1"},"_id":"@blubox/cors@0.0.1","gitHead":"84bf9e27a1deb44ddbd8a5b44b1966bd863c6989","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-mXbEYL/pFvd5dD6E5/qynWvhzdB6YLSBOipVuGadFXoKh+aWZS6Hfq+RiWDaPmfxNnQkUkxNeIuieYk/T5Uf5A==","shasum":"0b863277c9e09d0a7ad1ff7999e3a563015caa62","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-0.0.1.tgz","fileCount":6,"unpackedSize":6351,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBajtIAE9+LLtfe1JPE7je3XdzNd+noTQQMwQrdhVdR+AiEAuNllumlPzKgK8BteB7adu9tIQDKGVRJgVP72wtW9JR4="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_0.0.1_1696624036424_0.6358467376801591"},"_hasShrinkwrap":false},"0.0.2":{"name":"@blubox/cors","version":"0.0.2","description":"Blubox CORS","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/cors","license":"MIT","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.0.1"},"_id":"@blubox/cors@0.0.2","gitHead":"84bf9e27a1deb44ddbd8a5b44b1966bd863c6989","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-TK+lWkmeN1xnDZ+N2fZdsuvwzNC7vXEBacAUcPjTonN/PY/3ADCDU8bNNpt5ql3gzzSgadTdOoiiUy3kh5aRUg==","shasum":"7175dc5782f35d7a269936030748ec6cfcf81131","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-0.0.2.tgz","fileCount":6,"unpackedSize":6709,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQcSAC/TSMR4p6ile983DwHObRKKjV5oaQCCHJkABRzgIgc5UujcnxSNRLNiwJh7O2k2+OH6vC6lflusCiMUwmfak="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_0.0.2_1697136270518_0.9414056207896617"},"_hasShrinkwrap":false},"0.0.3":{"name":"@blubox/cors","version":"0.0.3","description":"Blubox CORS","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/cors","license":"MIT","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.0.1"},"_id":"@blubox/cors@0.0.3","gitHead":"f53ad493f47a033ef0c0b9c9fb0aace5275c4d30","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-vy/1KdmH3tF20LESLWhkEr8QcxEfYUu0MIBKKWLCYcGUvj34XTMWXbbiv7rceGOqJM/IePqwc/b8eqsuci1jBg==","shasum":"8ac9d2759720c8edbbde31aee39ab93aa76983cf","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-0.0.3.tgz","fileCount":6,"unpackedSize":6414,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSwJLGk9tw6FkmLGNww/mPXXYSlY8DhT52wfYGzsv+gwIhAP8G68oalZWzUGMVqy8np5zujOV9mckVv6ihiONgjKG5"}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_0.0.3_1697504919050_0.8622521181798051"},"_hasShrinkwrap":false},"0.0.4":{"name":"@blubox/cors","version":"0.0.4","description":"Blubox CORS","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/cors","license":"MIT","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.2.0"},"_id":"@blubox/cors@0.0.4","gitHead":"84d558115d2665f7a4a6a78316518461fe34a254","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-YOMwiUceoBqxt5AXjJPmttrAJvPI1hlbdkfcjyl+7N2n2J7kf+zX04cW2zh04ZDVmxM4U4erdA4e7lgVkqtH2Q==","shasum":"7337f7ae83fb25d32b8e0f805286db3011d35f44","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-0.0.4.tgz","fileCount":6,"unpackedSize":6919,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGM5eAQ2z3aC+1ZlvLdOwOcEntOACw6S0Moz5MOG00IAiEAzBtnlRyG6tJaA83PJsYJpcWP71tt5drUT+cYoBy5UFs="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_0.0.4_1698273089966_0.19892396798314294"},"_hasShrinkwrap":false},"0.0.5":{"name":"@blubox/cors","version":"0.0.5","description":"Blubox CORS","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/cors","license":"MIT","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.2.0"},"_id":"@blubox/cors@0.0.5","gitHead":"84d558115d2665f7a4a6a78316518461fe34a254","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-dokVoF07z2aNFFGZrIbwTIeZGYrudurW1BaFg9euZQU50a2woS5cbYUPU+uzoO5pjCNW1jjX3gDh/664RKlvtA==","shasum":"3c455a45eb0bf28eb51df43ca0e6c2bd2020e8d1","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-0.0.5.tgz","fileCount":6,"unpackedSize":6953,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBX+U5hoL5J4CGUKqvOSZtyjhYzrcvTfo1q2ZJBbAbbDAiEA3qESmupMxV+5Jxfpr1RY9zUTeo/BID9wXalz+vKdhfs="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_0.0.5_1698275859060_0.8537497798893938"},"_hasShrinkwrap":false},"0.0.6":{"name":"@blubox/cors","version":"0.0.6","description":"Blubox CORS","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/cors","license":"MIT","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.2.0"},"_id":"@blubox/cors@0.0.6","gitHead":"84d558115d2665f7a4a6a78316518461fe34a254","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-PTms6RJOeiL5gPNjuuTuDvHYJjHbQU21nUxCvsMCZKySZd6Hyf9bIAia5d0PVX22uyYxBv7z5JozZHglKMxvVQ==","shasum":"fcbdb7f5a60cae42cec93a00ae96fb351e56df4e","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-0.0.6.tgz","fileCount":6,"unpackedSize":6975,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGSaaaux8K57MLzvnWeF0g7DnQow1ArPDEQYZP4XmtKbAiEArGx+CBnJ5le5yqbODb4nGsj44loiRNdug3pMuIjdRb8="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_0.0.6_1698350804340_0.7672535499441924"},"_hasShrinkwrap":false},"1.0.0":{"name":"@blubox/cors","version":"1.0.0","description":"Blubox CORS","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"license":"MIT","homepage":"https://bluboxs.com/","private":false,"publishConfig":{"access":"public"},"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"peerDependencies":{"blubox":">=1.0.1"},"_id":"@blubox/cors@1.0.0","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-uDxYY3H9xBmOgCeUB41dl8w5tmYaevUJVFQKKf71pBigZ/oJMuIEC8F1+chgGOCphdPSy5V9FLOhjXlgLEVIOQ==","shasum":"a30b57253374af31b08f9c3d05901da7f1de1310","tarball":"https://registry.npmjs.org/@blubox/cors/-/cors-1.0.0.tgz","fileCount":6,"unpackedSize":5312,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjKShIP+3wM+14jhX2LaRVH31ESReb9aSh/DbnCuyLeAiEAsg4Fwv8iz0m2dG5adyqX1dr7BLDgSd9tmOzPrh5R9N8="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cors_1.0.0_1702238232678_0.47912880188852314"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-06T20:27:16.310Z","0.0.1":"2023-10-06T20:27:16.613Z","modified":"2023-12-10T19:57:13.076Z","0.0.2":"2023-10-12T18:44:30.728Z","0.0.3":"2023-10-17T01:08:39.242Z","0.0.4":"2023-10-25T22:31:30.185Z","0.0.5":"2023-10-25T23:17:39.346Z","0.0.6":"2023-10-26T20:06:44.552Z","1.0.0":"2023-12-10T19:57:12.864Z"},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"description":"Blubox CORS","homepage":"https://bluboxs.com/","keywords":["cors","blubox-cors","blubox","@blubox/cors"],"repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"license":"MIT","readme":"# CORS Middleware\r\n\r\nA middleware for handling Cross-Origin Resource Sharing (CORS) in your web server.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @blubox/cors\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nconst cors, { CorsOptions } = require('@blubox/cors')\r\nconst { Controller } = require('blubox')\r\n\r\nconst controller = new Controller()\r\ncontroller.use(cors(/* optional CorsOptions */))\r\n```\r\n\r\n## Options\r\n\r\n`allowedOrigins (optional)`: Array of allowed origins. Default is an empty array.\r\n`allowedMethods (optional)`: Array of allowed HTTP methods. Default is ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'].\r\n`allowedHeaders (optional)`: Array of allowed headers. Default is an empty array.\r\n`exposedHeaders (optional)`: Array of headers exposed to the client. Default is an empty array.\r\n`maxAge (optional)`: The maximum time (in seconds) that a preflight request may be cached. Default is 600.\r\n`credentials (optional)`: Boolean indicating whether credentials (e.g., cookies) should be included. Default is false.\r\n\r\n## License\r\n\r\n[MIT](https://github.com/gnzcode/blubox/blob/main/LICENSE.md)\r\n","readmeFilename":"README.md"}