From 4ae2a54da322538d6cb538f1a1dc4f3b9a2ce12f Mon Sep 17 00:00:00 2001 From: DullJZ <79080562+DullJZ@users.noreply.github.com> Date: Mon, 3 Nov 2025 20:33:05 +0800 Subject: [PATCH] No strict slash for WinSCP --- internal/api/s3_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/s3_handler.go b/internal/api/s3_handler.go index 8a8c7b0..b12ea4a 100644 --- a/internal/api/s3_handler.go +++ b/internal/api/s3_handler.go @@ -76,7 +76,7 @@ func (h *S3Handler) RegisterS3Routes(router *mux.Router) { // 带认证/虚拟主机的路由 protected := router.NewRoute().PathPrefix("/{bucket}").Subrouter() - protected.StrictSlash(true) + // 注意:不使用 StrictSlash(true) 以避免 301 重定向,兼容WinSCP // Bucket operations protected.HandleFunc("", h.handleBucketOperations).Methods("GET", "HEAD", "PUT", "DELETE")