Running without a separate user content instance requires abuse of command line options.

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

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
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
haskell
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu bằng cách đọc Distribution.Server.Framework.ServerEnv.requireUserContent và tái hiện lệnh được báo cáo từ commit 4231f36. Theo dõi cách required-base-host-header và user-content-uri tương tác khi cả hai cùng sử dụng localhost:1024. Hoàn tất khi một instance cục bộ đáng tin cậy có thể chạy mà không cần giá trị tùy chọn vô nghĩa và các request tới nội dung người dùng không còn đi vào vòng lặp chuyển hướng 301 vô hạn.

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

Mô tả

  1. I wish to run a local instance of a Hackage server. This is a trusted environment, so I see no need for a separate user content instance. 
  2. However, the flags required-base-host-header and user-content-uri are required.
  3. Moreover, when they are set all to the same value, say localhost:1024, any request to user content will result in an infinite 301 redirect due to the logic of the function Distribution.Server.Framework.ServerEnv.requireUserContent.

This problem can be overcome by setting required-base-host-header to a nonsensical value. Any string other than the true base host header would do.

I think this should be re-designed. Either the problematic options should be made optional, or an equality check should be added to the problematic logic.

This is the exact command I am running:

hackage-server run --static-dir datafiles --user-content-uri 'http://localhost:1024' --base-uri 'http://localhost:1024' --required-base-host-header 'localhost:1024' --port 1024

The executable file is built from the commit 4231f36.

Ngôn ngữ chính
Haskell
Star
471
Fork
228
Merge trung bình
5 ngày 6 giờ
Pull request đã merge (30 ngày)
3

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 haskell/hackage-server

Tất cả issue của haskell/hackage-server

Issue tương tự

Thêm issue về Haskell

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.