Skip to content

Commit

Permalink
Make sure openresty buffering is turned off
Browse files Browse the repository at this point in the history
This is unfortunately a bit of cargo-cult, to see if it will the fix
the timeout errors from allowed-images.bats on M1 mac minis:

> upstream timed out (110: Operation timed out) while connecting to upstream,
>   client: 127.0.0.1, server: mitm,
>   request: "HEAD /v2/rancher-sandbox/bats/ruby/manifests/latest HTTP/1.1",
>   upstream: "https://140.82.112.34:443/v2/rancher-sandbox/bats/ruby/manifests/latest",
>   host: "ghcr.io"

Signed-off-by: Jan Dubois <[email protected]>
  • Loading branch information
jandubois committed Feb 12, 2025
1 parent b74dcc4 commit f9102e8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/rancher-desktop/assets/scripts/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ http {
proxy_ssl_verify_depth 2;
location ~ ^/v[12]/(.+)/manifests/([^/]+)$ {
# not sure if this is really necessary
client_max_body_size 0;
# make sure buffering is really turned off even when using chunked transfers
proxy_http_version 1.1;
proxy_request_buffering off;
if ($forbidden) {
add_header "Content-type" "application/json" always;
# `code` from https://github.com/distribution/distribution/blob/main/registry/api/errcode/register.go
Expand All @@ -172,6 +178,12 @@ http {
}

location / {
# not sure if this is really necessary
client_max_body_size 0;
# make sure buffering is really turned off even when using chunked transfers
proxy_http_version 1.1;
proxy_request_buffering off;

proxy_pass https://$http_host;
}
}
Expand Down

0 comments on commit f9102e8

Please sign in to comment.