You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,8 @@ npm i @fastify/cors
19
19
|`^10.x`|`^5.x`|
20
20
|`^8.x`|`^4.x`|
21
21
|`^7.x`|`^3.x`|
22
-
|`^3.x`|`^2.x`|
23
-
|`^1.x`|`^1.x`|
24
-
22
+
|`>=3.x <7.x`|`^2.x`|
23
+
|`>=1.x <3.x`|`^1.x`|
25
24
26
25
Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin
27
26
in the table above.
@@ -76,6 +75,10 @@ You can use it as is without passing any option or you can configure it as expla
76
75
*`preflight`: Disables preflight by passing `false`. Default: `true`.
77
76
*`strictPreflight`: Enforces strict requirements for the CORS preflight request headers (**Access-Control-Request-Method** and **Origin**) as defined by the [W3C CORS specification](https://www.w3.org/TR/2020/SPSD-cors-20200602/#resource-preflight-requests). Preflight requests without the required headers result in 400 errors when set to `true`. Default: `true`.
78
77
*`hideOptionsRoute`: Hides the options route from documentation built using [@fastify/swagger](https://github.com/fastify/fastify-swagger). Default: `true`.
78
+
*`logLevel`: Sets the Fastify log level **only** for the internal CORS pre-flight `OPTIONS *` route.
79
+
Pass `'silent'` to suppress these requests in your logs, or any valid Fastify
0 commit comments