Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add h2c for http server #8294

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

j2rong4cn
Copy link
Contributor

@j2rong4cn j2rong4cn commented Apr 4, 2025

为alist的http服务支持HTTP/2 Cleartext (H2C)协议。明文的HTTP/2协议

  • 添加配置选项:scheme > enable_h2c 默认为false

开启后支持nginx的grpc_pass

location / {
  grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  grpc_set_header X-Forwarded-Proto $scheme;
  grpc_set_header Host $http_host;
  grpc_set_header X-Real-IP $remote_addr;
  # grpc_set_header Range $http_range;
  # grpc_set_header If-Range $http_if_range;
  proxy_redirect off;
  grpc_pass 127.0.0.1:5244;
  # the max size of file to upload
  client_max_body_size 20480m;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant