Redirect plain HTTP to HTTPS on direct TLS

Đang mở
#440 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Read internal/server/http.go and the TLS guide at site/src/content/docs/docs/guides/tls.mdx; first trace how direct TLS and FANOUT_PUBLIC_URL are configured. The issue is explicitly deferred until users request it, so confirm that demand exists before starting. Done means an opt-in port 80 listener redirects only to the configured HTTPS origin, startup rejects the setting without TLS, and the configuration reference and guide are updated.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

[!NOTE]
Deferred. Reverse proxies and CDNs already do this redirect, and a built-in one needs a second listener, which departs from the one-port design. Pick this up if people running direct TLS ask for it.

What

With direct TLS, the single listener serves only HTTPS, so someone who types a bare hostname into a browser gets a connection failure. An optional listener on port 80 could answer with a redirect to the HTTPS origin.

Acceptance criteria

  • Off by default; the one-port deployment is unchanged unless the setting is present
  • The listener serves only redirects, with no API, UI, MCP, or OTLP on it
  • The redirect target comes from configuration (FANOUT_PUBLIC_URL), never from the request Host header
  • Startup fails with an error naming the setting when TLS is not enabled
  • Configuration reference and TLS guide updated

References

  • internal/server/http.go
  • site/src/content/docs/docs/guides/tls.mdx

One pull request. Use the latest stable version of any dependency added, verified against its registry and pinned exactly.

Ngôn ngữ chính
Go
Star
11
Fork
0
Merge trung bình
7 giờ 5 phút
Pull request đã merge (30 ngày)
112

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của labstack/fanout

Tất cả issue của labstack/fanout

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.