fix(gateway): 优化security配置

This commit is contained in:
v-zhangjc9
2025-05-29 18:36:50 +08:00
parent 0f49c91fde
commit 95214f7af3
2 changed files with 4 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ public class SecurityConfiguration {
.and()
.httpBasic()
.and()
.cors()
.disable()
.csrf()
.disable()
.build();

View File

@@ -1,5 +1,6 @@
package com.lanyuanxiaoyao.service.gateway.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.WebFluxConfigurer;
@@ -10,6 +11,7 @@ import org.springframework.web.reactive.config.WebFluxConfigurer;
* @author lanyuanxiaoyao
* @date 2024-01-15
*/
@Configuration
public class WebConfiguration implements WebFluxConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {