From 44a365c87b76c237d86d37f9eecc1a8fff80dba6 Mon Sep 17 00:00:00 2001 From: Uzlopak Date: Thu, 22 Jun 2023 21:24:13 +0200 Subject: [PATCH] fix documentation, onRequest is default lifecycle stage (#254) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 220fba3..d8a58fb 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ You can use it as is without passing any option or you can configure it as expla } ``` * `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']`). -* `hook`: See the section `Custom Fastify hook name` (default: `onResponse`) +* `hook`: See the section `Custom Fastify hook name` (default: `onRequest`) * `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. * `exposedHeaders`: Configures the **Access-Control-Expose-Headers** CORS header. Expects a comma-delimited string (ex: `'Content-Range,X-Content-Range'`) or an array (ex: `['Content-Range', 'X-Content-Range']`). If not specified, no custom headers are exposed. * `credentials`: Configures the **Access-Control-Allow-Credentials** CORS header. Set to `true` to pass the header, otherwise it is omitted.