kauth-coder opened a new issue, #410:
URL: https://github.com/apache/rocketmq-dashboard/issues/410
写死了 origin 大哥们
```java
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("http://localhost:3003"));
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT",
"DELETE", "OPTIONS"));
configuration.setAllowedHeaders(Arrays.asList("content-type",
"Authorization", "X-Requested-With", "Origin", "Accept", "X-XSRF-TOKEN"));
configuration.setAllowCredentials(true);
configuration.setMaxAge(3600L);
UrlBasedCorsConfigurationSource source = new
UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration);
return source;
}
```
这个 configuration.setAllowedOrigins(Arrays.asList("http://localhost:3003"));
这个玩意为啥要写死啊,我部署到k8s后 用域名一直请求不通
现在我只能用 postman 手动调用接口 指定 Origin、Referer
真狗啊
<img width="1344" height="783" alt="Image"
src="https://github.com/user-attachments/assets/f719c8ee-c1bd-49f7-8371-b0f447e7244c"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]