diff options
author | Eric Wong <e@80x24.org> | 2021-08-08 01:03:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-08 01:17:20 +0000 |
commit | b5d21c2b21cc1c19b29d3298d14f207ba910a31d (patch) | |
tree | 4c428b6ca9f5eb0b66337d63305c7938c62dd561 /script | |
parent | 5d3e9705c8d5a6d0341a5f1bed2027ef9f9e95a8 (diff) | |
download | public-inbox-b5d21c2b21cc1c19b29d3298d14f207ba910a31d.tar.gz |
For users using the native TLS functionality of -httpd (instead of using nginx + Plack::Middleware::ReverseProxy), psgi.url_scheme=http was wrong and would lead to improper redirects.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-httpd | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/script/public-inbox-httpd b/script/public-inbox-httpd index 7b0ec560..a4dd8099 100755 --- a/script/public-inbox-httpd +++ b/script/public-inbox-httpd @@ -42,9 +42,10 @@ my $refresh = sub { }; PublicInbox::Daemon::run('0.0.0.0:8080', $refresh, - sub ($$$) { # post_accept - my ($client, $addr, $srv) = @_; + sub ($$$) { # Listener->{post_accept} + my ($client, $addr, $srv, $tls_wrap) = @_; my $fd = fileno($srv); - my $h = $httpds{$fd} //= PublicInbox::HTTPD->new($srv, $app); + my $h = $httpds{$fd} //= + PublicInbox::HTTPD->new($srv, $app, $client); PublicInbox::HTTP->new($client, $addr, $h), }); |