Socket
Socket
Sign inDemoInstall

@fastify/cors

Package Overview
Dependencies
Maintainers
20
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/cors - npm Package Compare versions

Comparing version 10.0.0-pre.fv5.1 to 10.0.0-pre.fv5.2

2

index.js

@@ -297,3 +297,3 @@ 'use strict'

const _fastifyCors = fp(fastifyCors, {
fastify: '4.x',
fastify: '5.x',
name: '@fastify/cors'

@@ -300,0 +300,0 @@ })

{
"name": "@fastify/cors",
"version": "10.0.0-pre.fv5.1",
"version": "10.0.0-pre.fv5.2",
"description": "Fastify CORS",

@@ -35,3 +35,3 @@ "main": "index.js",

"@fastify/pre-commit": "^2.1.0",
"@types/node": "^20.11.30",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",

@@ -43,3 +43,3 @@ "@typescript-eslint/parser": "^7.3.1",

"tap": "18.7.1",
"tsd": "^0.30.7",
"tsd": "^0.31.1",
"typescript": "^5.4.2"

@@ -46,0 +46,0 @@ },

@@ -66,3 +66,3 @@ # @fastify/cors

```
* `methods`: Configures the **Access-Control-Allow-Methods** CORS header. Expects a comma-delimited string (ex: 'GET,PUT,POST') or an array (ex: `['GET', 'PUT', 'POST']`).
* `methods`: Configures the **Access-Control-Allow-Methods** CORS header. Expects a comma-delimited string (ex: 'GET,PUT,POST') or an array (ex: `['GET', 'PUT', 'POST']`); (default: `GET,HEAD,PUT,PATCH,POST,DELETE`)
* `hook`: See the section `Custom Fastify hook name` (default: `onRequest`)

@@ -69,0 +69,0 @@ * `allowedHeaders`: Configures the **Access-Control-Allow-Headers** CORS header. Expects a comma-delimited string (ex: `'Content-Type,Authorization'`) or an array (ex: `['Content-Type', 'Authorization']`). If not specified, defaults to reflecting the headers specified in the request's **Access-Control-Request-Headers** header.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc