├── .eslintignore ├── .eslintrc ├── .github ├── semantic.yml └── workflows │ ├── publish.yml │ └── test.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.yaml ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── package.json ├── pnpm-lock.yaml ├── src ├── corsEventHandler.ts ├── defineCORSEventHandler.ts ├── index.ts ├── internals │ └── utils.ts ├── onRequestCORSMiddleware.ts └── useCors.ts ├── tests ├── corsEventHandler.spec.ts ├── defineCORSEventHandler.spec.ts ├── mocks │ ├── cors.ts │ ├── corsOnRequestMiddleware.ts │ └── handlers.ts ├── onRequestCORSMiddleware.spec.ts ├── shared │ └── handler.ts ├── useCors.spec.ts └── utilities │ └── server.ts ├── tsconfig.json └── vite.config.ts /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.eslintrc -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.github/semantic.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # Ignore artifacts: 4 | dist 5 | coverage -------------------------------------------------------------------------------- /.prettierrc.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.prettierrc.yaml -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.vscode/extensions.json -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /src/corsEventHandler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/src/corsEventHandler.ts -------------------------------------------------------------------------------- /src/defineCORSEventHandler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/src/defineCORSEventHandler.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/internals/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/src/internals/utils.ts -------------------------------------------------------------------------------- /src/onRequestCORSMiddleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/src/onRequestCORSMiddleware.ts -------------------------------------------------------------------------------- /src/useCors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/src/useCors.ts -------------------------------------------------------------------------------- /tests/corsEventHandler.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/corsEventHandler.spec.ts -------------------------------------------------------------------------------- /tests/defineCORSEventHandler.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/defineCORSEventHandler.spec.ts -------------------------------------------------------------------------------- /tests/mocks/cors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/mocks/cors.ts -------------------------------------------------------------------------------- /tests/mocks/corsOnRequestMiddleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/mocks/corsOnRequestMiddleware.ts -------------------------------------------------------------------------------- /tests/mocks/handlers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/mocks/handlers.ts -------------------------------------------------------------------------------- /tests/onRequestCORSMiddleware.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/onRequestCORSMiddleware.spec.ts -------------------------------------------------------------------------------- /tests/shared/handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/shared/handler.ts -------------------------------------------------------------------------------- /tests/useCors.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/useCors.spec.ts -------------------------------------------------------------------------------- /tests/utilities/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tests/utilities/server.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michealroberts/nitro-cors/HEAD/vite.config.ts --------------------------------------------------------------------------------