From 2cda40972b57266f196ff71c1fcbac4a001808c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Werner?= Date: Wed, 18 Jan 2023 15:31:04 +0100 Subject: [PATCH] docusaurus-migration --- .editorconfig | 12 ++++++++++++ docs/api/middleware/filesystem.md | 4 ++-- docs/api/middleware/timeout.md | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..d3c2ef88761 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{md,txt}] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = false diff --git a/docs/api/middleware/filesystem.md b/docs/api/middleware/filesystem.md index 44bc740dd61..79c70ba521c 100644 --- a/docs/api/middleware/filesystem.md +++ b/docs/api/middleware/filesystem.md @@ -4,10 +4,10 @@ title: FileSystem sidebar_position: 11 --- +Filesystem middleware for [Fiber](https://github.com/gofiber/fiber) that enables you to serve files from a directory. + :::caution **`:params` & `:optionals?` within the prefix path are not supported!** -::: -:::caution **To handle paths with spaces (or other url encoded values) make sure to set `fiber.Config{ UnescapePath: true}`** ::: diff --git a/docs/api/middleware/timeout.md b/docs/api/middleware/timeout.md index 039a67ea396..f56829ce130 100644 --- a/docs/api/middleware/timeout.md +++ b/docs/api/middleware/timeout.md @@ -4,7 +4,7 @@ title: Timeout sidebar_position: 20 --- -Timeout middleware for Fiber. As a `fiber.Handler` wrapper, it creates a context with `context.WithTimeout` and pass it in `UserContext`. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized `ErrorHandler`. +Timeout middleware for [Fiber](https://github.com/gofiber/fiber). As a `fiber.Handler` wrapper, it creates a context with `context.WithTimeout` and pass it in `UserContext`. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized `ErrorHandler`. It does not cancel long running executions. Underlying executions must handle timeout by using `context.Context` parameter. @@ -126,4 +126,4 @@ func main() { app.Get("/foo", timeout.New(handler, 10*time.Second)) app.Listen(":3000") } -``` \ No newline at end of file +```