zhaowenyu
2026-01-26 f5af0ddf027e2055a9e4ef79a9919ab4fb57f813
2026-01-24 zwy 机场上传媒体文件接口优化,不验证token
2 files modified
17 ■■■■■ changed files
ard-admin/src/main/java/com/ard/web/controller/sample/media/MinioProxyUploadController.java 15 ●●●●● patch | view | raw | blame | history
ard-framework/src/main/java/com/ard/framework/config/SecurityConfig.java 2 ●●●●● patch | view | raw | blame | history
ard-admin/src/main/java/com/ard/web/controller/sample/media/MinioProxyUploadController.java
@@ -3,6 +3,8 @@
import com.ard.common.config.OssConfiguration;
import com.ard.oss.model.CredentialsDTO;
import com.ard.oss.service.impl.OssServiceContext;
import com.ard.sample.common.model.ResponseResult;
import com.ard.sample.media.model.FileUploadDTO;
import com.ard.sample.utils.S3PutObjectResponse;
import io.minio.MinioClient;
import io.minio.PutObjectArgs;
@@ -15,12 +17,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.io.ByteArrayInputStream;
import java.security.InvalidKeyException;
@@ -128,4 +125,10 @@
            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
        }
    }
    @ApiOperation("测试")
    @PostMapping("/test")
    public ResponseResult fastUpload() {
        return ResponseResult.success();
    }
}
ard-framework/src/main/java/com/ard/framework/config/SecurityConfig.java
@@ -111,7 +111,7 @@
            .authorizeHttpRequests((requests) -> {
                permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
                // 对于登录login 注册register 验证码captchaImage 允许匿名访问
                requests.antMatchers("/login", "/register", "/captchaImage", "/ws/**","/actuator/**","/instances").permitAll()
                requests.antMatchers("/login", "/register", "/captchaImage", "/ws/**","/actuator/**","/instances","/minioTransfer/**").permitAll()
                    // 静态资源,可匿名访问
                    .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                    .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()