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: application.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: The app instance conventionally denotes the Fiber application.
6
6
7
7
## New
8
8
9
-
This method creates a new **App** named instance.
9
+
This method creates a new **App** named instance.
10
10
You can pass optional [settings ](application.md#settings)when creating a new instance.
11
11
12
12
{% code title="Signature" %}
@@ -83,7 +83,7 @@ func main() {
83
83
| CaseSensitive |`bool`| When enabled, `/Foo` and `/foo` are different routes. When disabled, `/Foo`and `/foo` are treated the same. |`false`|
84
84
| Immutable |`bool`| When enabled, all values returned by context methods are immutable. By default they are valid until you return from the handler, see issue [\#185](https://github.com/gofiber/fiber/issues/185). |`false`|
85
85
| BodyLimit |`int`| Sets the maximum allowed size for a request body, if the size exceeds the configured limit, it sends `413 - Request Entity Too Large` response. |`4 * 1024 * 1024`|
86
-
| TemplateEngine |`func(raw string, bind interface{}) (string, error)`| You can specify a custom template function to render different template languages. See our [**Template Middleware**](middleware.md#template)****for presets. |`nil`|
86
+
| TemplateEngine |`func(raw string, bind interface{}) (string, error)`| You can specify a custom template function to render different template languages. See our [**Template Middleware**](middleware.md#template)_\*\*_for presets. |`nil`|
87
87
| TemplateFolder |`string`| A directory for the application's views. If a directory is set, this will be the prefix for all template paths. `c.Render("home", data) -> ./views/home.pug`|`""`|
88
88
| TemplateExtension |`string`| If you preset the template file extension, you do not need to provide the full filename in the Render function: `c.Render("home", data) -> home.pug`|`"html"`|
89
89
| ReadTimeout |`time.Duration`| The amount of time allowed to read the full request including body. Default timeout is unlimited. |`nil`|
@@ -271,7 +271,7 @@ app.Listen("127.0.0.1:8080")
271
271
```
272
272
{% endcode %}
273
273
274
-
To enable **TLS/HTTPS** you can append a **[TLS config](https://golang.org/pkg/crypto/tls/#Config)**.
274
+
To enable **TLS/HTTPS** you can append a [**TLS config**](https://golang.org/pkg/crypto/tls/#Config).
Copy file name to clipboardExpand all lines: middleware.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -473,7 +473,7 @@ func main() {
473
473
app.Use(requestid.New())
474
474
475
475
app.Get("/", func(c *fiber.Ctx) {
476
-
c.Send("Hello, World!")
476
+
c.Send(requestid.Get(c))
477
477
})
478
478
479
479
app.Listen(3000)
@@ -535,7 +535,6 @@ func main() {
535
535
}
536
536
```
537
537
538
-
539
538
## Redirect
540
539
541
540
Redirects middleware provides an HTTP redirect to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code.
0 commit comments