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
Revise reverse proxy guide for clarity and updates
Updated the title and section headers for clarity. Added details on configuring Fiber to trust proxy headers and updated the list of popular reverse proxies.
Copy file name to clipboardExpand all lines: docs/guide/reverse-proxy.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
id: reverse-proxy
3
-
title: Reverse Proxies
3
+
title: reverse-proxy
4
4
description: >-
5
5
Learn how to set up reverse proxies like Nginx or Traefik to enable modern
6
6
HTTP capabilities in your Fiber application, including HTTP/2 and the
@@ -9,8 +9,10 @@ description: >-
9
9
sidebar_position: 4
10
10
---
11
11
12
-
# Reverse Proxies
13
-
## Enabling HTTP/2
12
+
## Reverse Proxies
13
+
14
+
### Enabling HTTP/2
15
+
14
16
Some features in Fiber, such as SendEarlyHints, require HTTP/2 or newer. If your app is served directly over HTTP/1.1, certain features may be ignored or not function as expected.
15
17
16
18
To enable HTTP/2 in production, run Fiber behind a reverse proxy that upgrades connections. Popular choices include Nginx and Traefik.
This configuration enables HTTP/2 with TLS and proxies requests to your Fiber app on port 3000.
41
41
</details>
42
42
<details>
@@ -62,10 +62,12 @@ http:
62
62
servers:
63
63
- url: "http://127.0.0.1:3000"
64
64
```
65
+
65
66
With this configuration, Traefik terminates TLS and serves your app over HTTP/2.
66
-
</details>\n\n### Configuring Fiber\n\nWhen your application is behind a proxy, you must configure Fiber to trust the proxy headers so that information like the client's IP address and protocol are correctly parsed. You can do this via the `ProxyHeader` configuration.\n\n```go\napp := fiber.New(fiber.Config{\n // For Nginx, you might use X-Real-IP or X-Forwarded-For\n ProxyHeader: fiber.HeaderXForwardedFor,\n})\n```\n\nFor more details, see the [configuration documentation on `ProxyHeader`](../api/fiber.md#proxyheader).
67
+
</details>
68
+
69
+
### HTTP/3 (QUIC) Support
67
70
68
-
## HTTP/3 (QUIC) Support
69
71
Early Hints (103 responses) are officially part of HTTP/2 and newer. Many reverse proxies also support HTTP/3 (QUIC):
70
72
71
73
- **Nginx**: Requires a recent build with QUIC/HTTP3 patches.
@@ -79,7 +81,8 @@ For more details, see the official documentation:
0 commit comments