You've already forked DataMate
config(security): 禁用安全配置中的frameOptions以允许iframe嵌入
- 在SecurityFilterChain中添加headers配置 - 禁用frameOptions以解决iframe嵌入限制问题 - 保持csrf禁用和其他现有安全设置不变
This commit is contained in:
@@ -17,6 +17,7 @@ public class SecurityConfig {
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
http.csrf(csrf -> csrf.disable())
|
||||
.headers(headers -> headers.frameOptions(frameOptions -> frameOptions.disable()))
|
||||
.authorizeHttpRequests(authz -> authz
|
||||
.anyRequest().permitAll() // 允许所有请求无需认证
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user