fix(gateway): 优化security配置
This commit is contained in:
@@ -29,6 +29,8 @@ public class SecurityConfiguration {
|
|||||||
.and()
|
.and()
|
||||||
.httpBasic()
|
.httpBasic()
|
||||||
.and()
|
.and()
|
||||||
|
.cors()
|
||||||
|
.disable()
|
||||||
.csrf()
|
.csrf()
|
||||||
.disable()
|
.disable()
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.service.gateway.configuration;
|
package com.lanyuanxiaoyao.service.gateway.configuration;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.web.reactive.config.CorsRegistry;
|
import org.springframework.web.reactive.config.CorsRegistry;
|
||||||
import org.springframework.web.reactive.config.WebFluxConfigurer;
|
import org.springframework.web.reactive.config.WebFluxConfigurer;
|
||||||
@@ -10,6 +11,7 @@ import org.springframework.web.reactive.config.WebFluxConfigurer;
|
|||||||
* @author lanyuanxiaoyao
|
* @author lanyuanxiaoyao
|
||||||
* @date 2024-01-15
|
* @date 2024-01-15
|
||||||
*/
|
*/
|
||||||
|
@Configuration
|
||||||
public class WebConfiguration implements WebFluxConfigurer {
|
public class WebConfiguration implements WebFluxConfigurer {
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
|
|||||||
Reference in New Issue
Block a user