当前位置:网站首页>网关gateway跨域
网关gateway跨域
2022-08-01 00:18:00 【聊Java】
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.reactive.CorsWebFilter;
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
@Configuration
public class MallCorsWebFilter {
@Bean
public CorsWebFilter corsWebFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.addAllowedHeader("*");
corsConfiguration.addAllowedMethod("*");
corsConfiguration.addAllowedOrigin("*");
corsConfiguration.setAllowCredentials(true);
source.registerCorsConfiguration("/**", corsConfiguration);
return new CorsWebFilter(source);
}
}
边栏推荐
- [Reading Notes -> Data Analysis] 02 Data Analysis Preparation
- lua入门案例实战123DIY
- TFC CTF 2022 WEB Diamand WriteUp
- Flink 1.13(八)CDC
- 对象缓存服务的思考和实现
- pycaret源码分析:下载数据集\Lib\site-packages\pycaret\datasets.py
- Automated machine learning pycaret: PyCaret Basic Auto Classification LightGBM
- 新产品如何进行网络推广?
- Compose principle - the view and the principle of two-way data binding
- SQL injection Less38 (stack injection)
猜你喜欢

Automated machine learning pycaret: PyCaret Basic Auto Classification LightGBM

一文概述:VPN的基本模型及业务类型

如何设计高可用高性能中间件 - 作业

leetcode:126. 单词接龙 II

Rainbow share | how to use moving targets defense technology to guard against the unknown

SVN server construction + SVN client + TeamCity integrated environment construction + VS2019 development

MLP神经网络,GRNN神经网络,SVM神经网络以及深度学习神经网络对比识别人体健康非健康数据

Southern University of Science and Technology: Xiaoying Tang | AADG: Automatic Enhancement for Generalization in the Field of Retinal Image Segmentation

自动化机器学习pycaret: PyCaret Basic Auto Classification LightGBM

One line of code to solve CoreData managed object properties change in SwiftUI problem of animation effects
随机推荐
Automated machine learning pycaret: PyCaret Basic Auto Classification LightGBM
如何撰写出一篇优质的数码类好物推荐文
Keil nRF52832下载失败
面试突击69:TCP 可靠吗?为什么?
Design the message queue storage MySQL form of message data
二叉树遍历非递归程序 -- 使用栈模拟系统栈
TFC CTF 2022 WEB Diamand WriteUp
Design of Fire and Anti-theft System Based on Single Chip GSM
推荐系统:常用评价指标总结【准确率、精确率、召回率、命中率、(归一化折损累计增益)NDCG、平均倒数排名(MRR)、ROC曲线、AUC(ROC曲线下的面积)、P-R曲线、A/B测试】
EntityFramework保存到SQLServer 小数精度丢失
Pylint检查规则中文版
Application of integrated stepper motor in UAV automatic airport
MLP神经网络,GRNN神经网络,SVM神经网络以及深度学习神经网络对比识别人体健康非健康数据
IPD流程专业术语
WindowInsetsControllerCompat简单使用
qlib量化源码分析:qlib/qlib/contrib/model/gbdt.py
考研备考方案
消息队列存储消息数据的MySQL表格
Web3.0: Building an NFT Market (1)
SQL injection Less42 (POST type stack injection)