skyleaworlder commented on issue #14:
URL:
https://github.com/apache/shenyu-helm-chart/issues/14#issuecomment-1256937440
I add a few more log about this issue:
When shenyu-bootstrap fails to build a ws connection, shenyu-admin reports:
```shell
2022-09-24 10:44:45 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: detailUsingGET_3
2022-09-24 10:44:45 [main] INFO
org.apache.shenyu.admin.ShenyuAdminBootstrap - Started ShenyuAdminBootstrap in
9.2 seconds (JVM running for 9.728)
2022-09-24 10:44:45 [main] WARN org.apache.shenyu.admin.utils.SessionUtil -
get user info error ,not found, used default user ,it unknown
2022-09-24 10:44:46 [http-nio-0.0.0.0-9095-exec-1] INFO
org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing
Spring DispatcherServlet 'dispatcherServlet'
2022-09-24 10:44:46 [http-nio-0.0.0.0-9095-exec-1] INFO
org.springframework.web.servlet.DispatcherServlet - Initializing Servlet
'dispatcherServlet'
2022-09-24 10:44:46 [http-nio-0.0.0.0-9095-exec-1] INFO
org.springframework.web.servlet.DispatcherServlet - Completed initialization in
2 ms
2022-09-24 10:44:46 [http-nio-0.0.0.0-9095-exec-1] ERROR
org.apache.shenyu.admin.listener.websocket.WebsocketConfigurator -
originHeaderValue is forbidden: ws://shenyu-bootstrap:9195
2022-09-24 10:44:56 [http-nio-0.0.0.0-9095-exec-2] ERROR
org.apache.shenyu.admin.listener.websocket.WebsocketConfigurator -
originHeaderValue is forbidden: ws://shenyu-bootstrap:9195
```
And I locate this piece of log:
```java
// org.apache.shenyu.admin.listener.websocket.WebsocketConfigurator
@Override
public boolean checkOrigin(final String originHeaderValue) {
final WebsocketSyncProperties bean =
SpringBeanUtils.getInstance().getBean(WebsocketSyncProperties.class);
if (StringUtils.isNotEmpty(bean.getAllowOrigins())) {
String[] split = StringUtils.split(bean.getAllowOrigins(), ";");
for (String configAllow : split) {
if (StringUtils.equals(configAllow, originHeaderValue)) {
return true;
}
}
LOG.error("originHeaderValue is forbidden: " + originHeaderValue);
return false;
}
return super.checkOrigin(originHeaderValue);
}
```
It seems that the "AllOrigin" value passed in doesn't equal ws request
header.
--
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]