From a1c59a0b3e62fe1dbc7f9c91804ef06b051ae71f Mon Sep 17 00:00:00 2001 From: Jake Awe Date: Mon, 26 Jun 2023 13:35:43 -0500 Subject: [PATCH] allow HEAD requests --- common/etc/nginx/include/s3gateway.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/etc/nginx/include/s3gateway.js b/common/etc/nginx/include/s3gateway.js index b32af767..dda556cc 100644 --- a/common/etc/nginx/include/s3gateway.js +++ b/common/etc/nginx/include/s3gateway.js @@ -320,7 +320,7 @@ function redirectToS3(r) { const uriPath = r.variables.uri_path; const isDirectoryListing = ALLOW_LISTING && _isDirectory(uriPath); - if (isDirectoryListing && r.method === 'GET') { + if (isDirectoryListing && (r.method === 'GET' || r.method === 'HEAD')) { r.internalRedirect("@s3PreListing"); } else if ( PROVIDE_INDEX_PAGE == true ) { r.internalRedirect("@s3");