SpringBoot WebSocket 跨域报错:Origin header value not allowed. Even though URL is allowed
来源:互联网 发布:sql中is null什么意思 编辑:程序博客网 时间:2024/06/05 01:07
解决
@Configuration@EnableWebSocketMessageBrokerpublic class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public void registerStompEndpoints(StompEndpointRegistry registry) { // the endpoint for websocket connections registry.addEndpoint("/stomp").setAllowedOrigins("*").withSockJS(); } // remaining config not shown as not relevant}
来自:https://stackoverflow.com/questions/32874421/websocket-in-spring-boot-app-getting-403-forbidden
阅读全文
0 0
- SpringBoot WebSocket 跨域报错:Origin header value not allowed. Even though URL is allowed
- springboot WebSocket 跨域报错问题:Origin header value 'http://127.0.0.1:8080' not allowed.
- jquey XMLHttpRequest cannot load url.Origin null is not allowed by Access-Control-Allow-Origin
- Origin null is not allowed by Access-Control-Allow-Origin.
- Origin null is not allowed by Access-Control-Allow-Origin
- Origin null is not allowed by Access-Conntrol-Allow-Origin
- jquery跨域报错:Origin null is not allowed by Access Control Allow Origin
- url中增加端口号之后提示Origin is not allowed by Access-Control-Allow-Origin. Angular JS
- 前端开发中使用nginx跨域解决No Access-Control-Allow-Origin header localhost:63342 is not allowed access
- js bug: Origin 'null' is therefore not allowed access.
- XMLHttpRequest cannot load – Origin is not allowed by Access-Control-Allow-Origin.
- XMLHttpRequest Origin null is not allowed by Access-Control-Allow-Origin
- JQuery 的 ajax 出现Origin null is not allowed by Access-Control-Allow-Origin 解决方法
- XMLHttpRequest在请求失败(Origin null is not allowed by Access-Control-Allow-Origin.)
- Origin XX is not allowed by Access-Control-Allow-Origin.解决办法
- Origin null is not allowed by Access-Control-Allow-Origin解决方案
- XMLHttpRequest在请求失败(Origin null is not allowed by Access-Control-Allow-Origin.)
- XMLHttpRequest cannot load – Origin is not allowed by Access-Control-Allow-Origin.
- Ajax 完整教程
- 关于JDK8的新特性
- 论文解读Attribute-Enhanced Face Recognition with Neural Tensor Fusion Networks
- HTTP缓存
- POJ
- SpringBoot WebSocket 跨域报错:Origin header value not allowed. Even though URL is allowed
- 高效生活系列
- 665. Non-decreasing Array(C++)
- sql关键字
- 字符串匹配算法(Brute-Force)
- java并发与多线程
- AJAX工作原理及其优缺点
- 责任链模式实现的三种方式
- Cantor表