Skip to content

Commit 70e6ea0

Browse files
(PTFE-3070) No redirect for HEAD
1 parent 95421a1 commit 70e6ea0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

conf/nginx.conf.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ http {
261261
if ($http_user_agent !~* "Mozilla") {
262262
set $builds_backend "/redirect/";
263263
}
264+
# HEAD requests are metadata checks, not downloads: always proxy directly.
265+
if ($request_method = "HEAD") {
266+
set $builds_backend "/download/";
267+
}
264268
rewrite ^/builds/([^/]+/.+[^/])$ $builds_backend$1 last;
265269
rewrite ^/builds/(.*)$ /download/$1 last;
266270

0 commit comments

Comments
 (0)