📒 docs: Document usage of reverse proxies for SendEarlyHints#3776
📒 docs: Document usage of reverse proxies for SendEarlyHints#3776akilesh1706 wants to merge 15 commits into
Conversation
|
Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughUpdates documentation: replaces the SendEarlyHints HTTP/2 caution in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @akilesh1706, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Fiber documentation by providing clear guidance on how to enable HTTP/2 and HTTP/3 in Fiber applications, particularly when using reverse proxies such as Nginx and Traefik. The changes introduce a dedicated guide with practical configuration examples and integrate a reference to this guide within the "SendEarlyHints" documentation, ensuring users have the necessary information to leverage modern HTTP features effectively. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds valuable documentation for enabling HTTP/2 with reverse proxies. The new guide is clear and provides useful examples for Nginx and Traefik. I've provided a few suggestions to improve the examples and formatting for better clarity and correctness. The most important suggestion is to add standard proxy headers to the Nginx configuration to ensure the backend application receives necessary client information.
| proxy_set_header Host $host; | ||
| } |
There was a problem hiding this comment.
This Nginx configuration is missing important headers for a reverse proxy setup. To ensure the backend Fiber application can correctly identify the client's IP address and the protocol used, you should add X-Real-IP, X-Forwarded-For, and X-Forwarded-Proto headers. This is crucial for logging, security, and generating correct URLs.
| proxy_set_header Host $host; | |
| } | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| } |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docs/guide/enabling-http2.md (1)
18-57: Use the matching code fence language for each proxy example.Label the Nginx block as
nginx(orconf) and the Traefik block asyamlso readers get accurate syntax highlighting instead of the currentgohighlighting.docs/api/ctx.md (1)
2176-2180: Complete the caution sentence about legacy clients.While you’re touching this block, please finish the sentence so it reads cleanly—for example: “Some legacy HTTP/1.1 clients may not support Early Hints.” Keep the new guide link right after it.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/api/ctx.md(1 hunks)docs/guide/enabling-http2.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Review and update the contents of the
docsfolder if necessary when modifying code
Files:
docs/api/ctx.mddocs/guide/enabling-http2.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds documentation to help users enable HTTP/2 (and optionally HTTP/3) in Fiber applications using reverse proxies, specifically addressing the requirements for features like SendEarlyHints that need HTTP/2 or newer protocols.
- Created a comprehensive guide for configuring reverse proxies to enable HTTP/2
- Added cross-reference from SendEarlyHints documentation to the new guide
- Provided example configurations for Nginx and Traefik
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/guide/enabling-http2.md | New guide with reverse proxy configurations for enabling HTTP/2 support |
| docs/api/ctx.md | Added reference link to the HTTP/2 enabling guide from SendEarlyHints section |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
@akilesh1706 Check the ci failures and suggested changes |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds valuable documentation on using reverse proxies with Fiber to enable HTTP/2 and HTTP/3. My review includes a few suggestions to enhance the new documentation page. The most critical feedback is to include X-Forwarded-* headers in the Nginx configuration example, as this is essential for applications behind a proxy to function correctly. I've also suggested minor improvements to the page's metadata, headings, and external links for better clarity and consistency.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
This PR adds documentation to guide users on enabling HTTP/2 (and optionally HTTP/3) in Fiber applications using reverse proxies such as Nginx and Traefik.
The new page docs/guide/enabling-http2.md provides example configurations and references to official proxy documentation.
Additionally, the SendEarlyHints section in docs/api/ctx.md has been updated to link to this guide, helping users understand how to properly enable required protocols.
Fixes # (issue)
Changes introduced
List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.
Type of change
Checklist
Before you submit your pull request, please make sure you meet these requirements:
/docs/directory for Fiber's documentation.