{"_id":"@chubbyts/chubbyts-http-cors","_rev":"8-a6939c4689350c4fda975e5fcf8464ef","name":"@chubbyts/chubbyts-http-cors","dist-tags":{"latest":"2.0.1"},"versions":{"1.2.1":{"name":"@chubbyts/chubbyts-http-cors","version":"1.2.1","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-http-cors@1.2.1","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"dist":{"shasum":"a51d1022e9e87e15942cc54b1fd0731bb49a5352","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-http-cors/-/chubbyts-http-cors-1.2.1.tgz","fileCount":9,"integrity":"sha512-kx4N3G55DayDjycgZGXPcC9uVMff7drj0ehgvSSia6TjMaeZBaAjjRhRTS6p7uGKdx5dJAiEOHuD+t+/HXO0ow==","signatures":[{"sig":"MEQCIDu46gTR+LNpmkLmlnIlsczWWeiRuIw+k6MJ00h4cFNFAiA20OoJNF7YDkPtf7sJgldZZdPL5lVyDuB9JLzSWBvafg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19441},"jest":{"preset":"ts-jest","testEnvironment":"node","coverageThreshold":{"global":{"lines":100}},"collectCoverageFrom":["src/**/*.ts"]},"type":"module","engines":{"node":">=16"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.mjs","default":"./*.mjs","require":"./*.cjs"}},"gitHead":"7937bd5b57448cd792a1797c902c4e3d19665477","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"jest","build":"node ./build.js","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"deprecated":"@chubbyts/chubbyts-http-types is replaced by@chubbyts/chubbyts-undici-server, use @chubbyts/chubbyts-undici-cors.","repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"_npmVersion":"10.4.0","description":"A CORS middleware for @chubbyts/chubbyts-http-types.","directories":{},"_nodeVersion":"20.11.1","dependencies":{"@chubbyts/chubbyts-http-types":"^1.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.1","ts-jest":"^29.1.1","prettier":"^3.0.0","typescript":"^5.1.6","@types/jest":"^29.5.3","@types/node":"^20.4.5","@stryker-mutator/core":"^7.1.1","@chubbyts/chubbyts-eslint":"^2.0.3","@chubbyts/chubbyts-packaging":"^2.0.4","@stryker-mutator/jest-runner":"^7.1.1","@chubbyts/chubbyts-function-mock":"^1.4.1"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-http-cors_1.2.1_1709062650932_0.4090199597967157","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@chubbyts/chubbyts-http-cors","version":"1.3.0","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-http-cors@1.3.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"dist":{"shasum":"431b9eec774cff63b73997e114dca51a10adc1a1","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-http-cors/-/chubbyts-http-cors-1.3.0.tgz","fileCount":9,"integrity":"sha512-zGQVnG0r0tfruHn1ds75U4GdnTqb0KRFxlZG9y94OLRCNAXcYzkkNeEGWpYdJGEtwaK5/gpL2uvaC1rvixLHbg==","signatures":[{"sig":"MEUCIHJYf5C4/ZdPg95Uc083c9DnzXcA2bQL0esyYYDoyhoBAiEA46oo6gWDBOX3x+15a8VJyhSDx4EVsAw5tWv0aoIAIr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19255},"type":"module","engines":{"node":">=18"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.mjs","default":"./*.mjs","require":"./*.cjs"}},"gitHead":"1a752944c8ed55b4468f28031a52c581ec6943f5","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"node ./build.mjs","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.mjs vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"deprecated":"@chubbyts/chubbyts-http-types is replaced by@chubbyts/chubbyts-undici-server, use @chubbyts/chubbyts-undici-cors.","repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"_npmVersion":"10.9.2","description":"A CORS middleware for @chubbyts/chubbyts-http-types.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"@chubbyts/chubbyts-http-types":"^1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","prettier":"^3.4.2","typescript":"^5.7.2","@types/node":"^22.10.5","@vitest/coverage-v8":"^2.1.8","@stryker-mutator/core":"^8.7.1","@chubbyts/chubbyts-eslint":"^3.0.1","@chubbyts/chubbyts-packaging":"^3.0.0","@stryker-mutator/vitest-runner":"^8.7.1","@chubbyts/chubbyts-function-mock":"^1.5.1"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-http-cors_1.3.0_1735939707403_0.5589647043382728","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@chubbyts/chubbyts-http-cors","version":"1.3.1","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-http-cors@1.3.1","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"dist":{"shasum":"6c176ec1087975708ca9a37652299a62d2dd0b18","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-http-cors/-/chubbyts-http-cors-1.3.1.tgz","fileCount":9,"integrity":"sha512-v55Hk2EZV/r32fvpCp86JJ0CpSJ8/PjchIB8+tczxaWCdlNcSxsxHaNwhAYfDFm+WaCkTqEqAWI1UxwQTx2SgQ==","signatures":[{"sig":"MEQCIBXZyqgcbyHci3wfh0Z58n5+RXV8wHT++1um5Yp3S3htAiBkgZGWTaj3v3gwt3+0l6Rb5W5sA/dcT4G3DDPp1wqFyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19255},"type":"module","engines":{"node":">=18"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.mjs","default":"./*.mjs","require":"./*.cjs"}},"gitHead":"1a752944c8ed55b4468f28031a52c581ec6943f5","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"node ./build.mjs","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.mjs vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"deprecated":"@chubbyts/chubbyts-http-types is replaced by@chubbyts/chubbyts-undici-server, use @chubbyts/chubbyts-undici-cors.","repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"_npmVersion":"10.9.2","description":"A CORS middleware for @chubbyts/chubbyts-http-types.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"@chubbyts/chubbyts-http-types":"^1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","prettier":"^3.4.2","typescript":"^5.7.2","@types/node":"^22.10.5","@vitest/coverage-v8":"^2.1.8","@stryker-mutator/core":"^8.7.1","@chubbyts/chubbyts-eslint":"^3.0.3","@chubbyts/chubbyts-packaging":"^3.0.2","@stryker-mutator/vitest-runner":"^8.7.1","@chubbyts/chubbyts-function-mock":"^1.5.2"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-http-cors_1.3.1_1735987123818_0.19155436266265635","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@chubbyts/chubbyts-http-cors","version":"1.4.0","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-http-cors@1.4.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"dist":{"shasum":"5e179db2147b9e60f06bb9092d38ed04ffb1fa91","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-http-cors/-/chubbyts-http-cors-1.4.0.tgz","fileCount":9,"integrity":"sha512-2S4m5Z4WjtDf2J6OPxJy3WNhqZOU1xGbAJ6/2tlj56GbHLHVBzDwnSG8l0Xltwdwx4OZcHroyQG9XNPni2QCMw==","signatures":[{"sig":"MEUCICTnJd6w/wfnqrJY0W1JAVKNpcJqCWX1M+7jdsSBEFzHAiEAj/Dmf5y+cBkbcKQKqzDobrpLcu7JU7qw2+FLXiSax0A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19093},"type":"module","engines":{"node":">=18"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.mjs","default":"./*.mjs","require":"./*.cjs"}},"gitHead":"50d64fc889b246c1c6c57669cf773da2a4cb09de","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"node ./build.mjs","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.mjs vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"deprecated":"@chubbyts/chubbyts-http-types is replaced by@chubbyts/chubbyts-undici-server, use @chubbyts/chubbyts-undici-cors.","repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"_npmVersion":"11.1.0","description":"A CORS middleware for @chubbyts/chubbyts-http-types.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"@chubbyts/chubbyts-http-types":"^1.3.1 || ^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","prettier":"^3.4.2","typescript":"^5.7.2","@types/node":"^22.10.5","@vitest/coverage-v8":"^2.1.8","@stryker-mutator/core":"^8.7.1","@chubbyts/chubbyts-eslint":"^3.0.3","@chubbyts/chubbyts-packaging":"^3.0.2","@stryker-mutator/vitest-runner":"^8.7.1","@chubbyts/chubbyts-function-mock":"^1.5.2"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-http-cors_1.4.0_1738701500040_0.6603527641009272","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@chubbyts/chubbyts-http-cors","version":"2.0.0","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-http-cors@2.0.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"dist":{"shasum":"1479517720eb5a0ec1b6f0cdda47aeeb26d34281","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-http-cors/-/chubbyts-http-cors-2.0.0.tgz","fileCount":7,"integrity":"sha512-gxtvFYOv9XXyOod924j66wxEP6eHLHVVP+czyh7ibM2MWXB6jh/dUFf8a2Retj12AaobNlrijNtnyJy0tfSh9Q==","signatures":[{"sig":"MEUCIQCdzotigKwpXlH0Ql8/6c5DqRzuBUA9GACumT4zBYHFWgIgatl+tVuNGijWtgQB5box3sm0OVwkXIN6WQUQL+Upf0w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13248},"type":"module","engines":{"node":">=18"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"gitHead":"07fccb86427c28575777ea44bdf0dc30a2f6818d","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"deprecated":"@chubbyts/chubbyts-http-types is replaced by@chubbyts/chubbyts-undici-server, use @chubbyts/chubbyts-undici-cors.","repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"_npmVersion":"10.9.2","description":"A CORS middleware for @chubbyts/chubbyts-http-types.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@chubbyts/chubbyts-http-types":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.3","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^24.0.1","@vitest/coverage-v8":"^3.2.3","@stryker-mutator/core":"^9.0.1","@chubbyts/chubbyts-eslint":"^4.0.2","@chubbyts/chubbyts-packaging":"^4.0.0","@stryker-mutator/vitest-runner":"^9.0.1","@chubbyts/chubbyts-function-mock":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-http-cors_2.0.0_1750013512271_0.8162135039154192","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@chubbyts/chubbyts-http-cors","version":"2.0.1","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-http-cors@2.0.1","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"dist":{"shasum":"a55ff284b650b50bad3272b7e82dcc6a75f3db54","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-http-cors/-/chubbyts-http-cors-2.0.1.tgz","fileCount":7,"integrity":"sha512-5lgNVmtn6F4DMqK61fKwqCvaMN8ukYA5jpf53Cwt0r02NEUu/cu3C5Sy/cI/qlB1ZDL4D+Gprlb6+wtEFmoClA==","signatures":[{"sig":"MEQCICgHo8ZL31vefF63VGtEQhL0c1+wySnNqXikpLTbmKNgAiBiH8QUhMGld9N/8bXRGCuqEaoZFFbZyAMkonzeU6eGQg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13251},"type":"module","engines":{"node":">=18"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"gitHead":"2841c82f7406c7572d02f3633670a957ff27620a","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"deprecated":"@chubbyts/chubbyts-http-types is replaced by@chubbyts/chubbyts-undici-server, use @chubbyts/chubbyts-undici-cors.","repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"_npmVersion":"10.9.2","description":"A CORS middleware for @chubbyts/chubbyts-http-types.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@chubbyts/chubbyts-http-types":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.3","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^24.0.1","@vitest/coverage-v8":"^3.2.3","@stryker-mutator/core":"^9.0.1","@chubbyts/chubbyts-eslint":"^4.0.2","@chubbyts/chubbyts-packaging":"^4.0.0","@stryker-mutator/vitest-runner":"^9.0.1","@chubbyts/chubbyts-function-mock":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-http-cors_2.0.1_1750050628437_0.42459937076667287","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-02-27T19:37:30.828Z","modified":"2025-09-12T06:57:38.574Z","1.2.1":"2024-02-27T19:37:31.119Z","1.3.0":"2025-01-03T21:28:27.571Z","1.3.1":"2025-01-04T10:38:43.991Z","1.4.0":"2025-02-04T20:38:21.271Z","2.0.0":"2025-06-15T18:51:52.446Z","2.0.1":"2025-06-16T05:10:28.611Z"},"bugs":{"url":"https://github.com/chubbyts/chubbyts-http-cors/issues"},"author":{"name":"Dominik Zogg"},"license":"MIT","homepage":"https://github.com/chubbyts/chubbyts-http-cors#readme","keywords":[],"repository":{"url":"git+https://github.com/chubbyts/chubbyts-http-cors.git","type":"git"},"description":"A CORS middleware for @chubbyts/chubbyts-http-types.","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"readme":"# chubbyts-http-cors\n\n[![CI](https://github.com/chubbyts/chubbyts-http-cors/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-http-cors/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyts/chubbyts-http-cors/badge.svg?branch=master)](https://coveralls.io/github/chubbyts/chubbyts-http-cors?branch=master)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyts%2Fchubbyts-http-cors%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyts/chubbyts-http-cors/master)\n[![npm-version](https://img.shields.io/npm/v/@chubbyts/chubbyts-http-cors.svg)](https://www.npmjs.com/package/@chubbyts/chubbyts-http-cors)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-http-cors&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-http-cors)\n\n## Description\n\nA CORS middleware for @chubbyts/chubbyts-http-types.\n\n*Apply toLowerCase() to each related request header name before pass the request to this middleware.*\n\n## Requirements\n\n * node: 18\n * [@chubbyts/chubbyts-http-types][2]: ^3.0.0\n\n## Installation\n\nThrough [NPM](https://www.npmjs.com) as [@chubbyts/chubbyts-http-cors][1].\n\n```ts\nnpm i @chubbyts/chubbyts-http-cors@^2.0.1\n```\n\n## Usage\n\n```ts\nimport { createCorsMiddleware } from '@chubbyts/chubbyts-http-cors/dist/middleware';\nimport {\n  createAllowOriginRegex,\n  createHeadersNegotiator,\n  createMethodNegotiator,\n  createOriginNegotiator,\n} from '@chubbyts/chubbyts-http-cors/dist/negotiation';\nimport { createResponseFactory } from '@chubbyts/chubbyts-http/dist/message-factory';\nimport { Method } from '@chubbyts/chubbyts-http-types/dist/message';\n\nconst corsMiddleware = createCorsMiddleware(\n  createResponseFactory(),\n  createOriginNegotiator([createAllowOriginRegex(/^https?\\:\\/\\/localhost(\\:\\d+)?$/)]),\n  createMethodNegotiator(['GET', 'POST', 'PUT', 'DELETE']),\n  createHeadersNegotiator(['Content-Type', 'Accept']),\n);\n\n(async () => {\n  const response = await corsMiddleware(request, handler);\n})();\n```\n\n## Copyright\n\n2025 Dominik Zogg\n\n[1]: https://www.npmjs.com/package/@chubbyts/chubbyts-http-cors\n[2]: https://www.npmjs.com/package/@chubbyts/chubbyts-http-types\n","readmeFilename":"README.md"}