当前位置:网站首页>网关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);
}
}
边栏推荐
- 类和对象:上
- Mysql environment installation under Linux (centos)
- Force buckle 2326, 197
- [Reading Notes -> Data Analysis] 02 Data Analysis Preparation
- Classes and Objects: Above
- [AMEX] LGBM Optuna American Express Credit Card Fraud Contest kaggle
- Nmap 操作手册 - 完整版
- [MATLAB project combat] LDPC-BP channel coding
- thymeleaf iterates the map collection
- 南方科技大学:Xiaoying Tang | AADG:视网膜图像分割领域泛化的自动增强
猜你喜欢
基于simulink的Active anti-islanding-AFD主动反孤岛模型仿真
一文带你了解 Grafana 最新开源项目 Mimir 的前世今生
Unity3D学习笔记10——纹理数组
精心总结十三条建议,帮你创建更合适的MySQL索引
Shell common scripts: Nexus batch upload local warehouse enhanced version script (strongly recommended)
什么是动态规划,什么是背包问题
TFC CTF 2022 WEB Diamand WriteUp
Handwritten a simple web server (B/S architecture)
Google "Cloud Developer Quick Checklist"; Tsinghua 3D Human Body Dataset; SenseTime "Universal Vision Framework" open class; Web3 Minimalist Getting Started Guide; Free Books for Efficient Deep Learni
pycaret源码分析:下载数据集\Lib\site-packages\pycaret\datasets.py
随机推荐
如何设计高可用高性能中间件 - 作业
IPD process terminology
[微服务]分布式事务解决方案-Seata
Redis五种数据类型简介
[AMEX] LGBM Optuna American Express Credit Card Fraud Contest kaggle
游戏安全03:缓冲区溢出攻击简单解释
面试题:实现死锁
[1161. The maximum sum of elements in the layer]
Xinao Learning Plan The Road to Informatics Competition (2022.07.31)
Design of Fire and Anti-theft System Based on Single Chip GSM
cobaltstrike
lua入门案例实战123DIY
thymeleaf迭代map集合
Thinking and Implementation of Object Cache Service
/usr/local/bin和/usr/bin的区别
推荐系统:常用评价指标总结【准确率、精确率、召回率、命中率、(归一化折损累计增益)NDCG、平均倒数排名(MRR)、ROC曲线、AUC(ROC曲线下的面积)、P-R曲线、A/B测试】
Web3.0: Building an NFT Market (1)
Matlab / ArcGIS 处理GPM全球月均降水数据
Google "Cloud Developer Quick Checklist"; Tsinghua 3D Human Body Dataset; SenseTime "Universal Vision Framework" open class; Web3 Minimalist Getting Started Guide; Free Books for Efficient Deep Learni
EntityFramework保存到SQLServer 小数精度丢失