0508优化修改

This commit is contained in:
lzm
2026-05-08 09:32:53 +08:00
parent e3e16f73cc
commit e278ca59bd
7 changed files with 52 additions and 74 deletions

View File

@@ -112,6 +112,7 @@ public class LyzsysWebAutoConfiguration {
config.addAllowedOriginPattern("*"); // 设置访问源地址
config.addAllowedHeader("*"); // 设置访问源请求头
config.addAllowedMethod("*"); // 设置访问源请求方法
config.addExposedHeader("Content-Disposition"); // 允许前端读取下载文件名
// 创建 UrlBasedCorsConfigurationSource 对象
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", config); // 对接口配置跨域设置