Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On the front end, the websocket button is useless #1933

Closed
xyz2b opened this issue Jun 4, 2021 · 7 comments · Fixed by #2052
Closed

On the front end, the websocket button is useless #1933

xyz2b opened this issue Jun 4, 2021 · 7 comments · Fixed by #2052
Labels
bug Something isn't working
Milestone

Comments

@xyz2b
Copy link

xyz2b commented Jun 4, 2021

Issue description

I enable websocket in dashborad, but it doesn't work after I saved it.
I check that there is no websocket parameter in the request initiated.

Expected behavior

How to Reproduce

  1. Go to 'route config website'
  2. Click on 'WebSocket button'
  3. And save route config
  4. Checking the configuration of the route
  5. The WebSocket button is gray

Screenshots

企业微信截图_16227872597735

企业微信截图_16227872997999

企业微信截图_16227873305622

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have: 2.6.1
  • Browser version, if have: chrome 89.0.4389.90

Additional context

@xyz2b xyz2b added the bug Something isn't working label Jun 4, 2021
@liuxiran liuxiran added this to the 2.7.1 milestone Aug 9, 2021
@liuxiran
Copy link
Contributor

liuxiran commented Aug 9, 2021

Confirmed, when bind a service in create Route step1, enable_websocket will be lost, and without Service binding, enable_websocket work normally. Need to fix it in 2.7.1

cc @juzhiyuan

@juzhiyuan
Copy link
Member

cc @Baoyuantop to take a look, and @liuxiran please provide some necessary testcases for this fix.

@liuxiran
Copy link
Contributor

liuxiran commented Aug 9, 2021

@spacewander help request about this enable_websocket param in route: when we create a route with redirect plugin, does it still need enable_websocket param? looking forward to your reply, thanks a lot

after this question got confirmed, I 'll provide corresponding test cases about this issue @juzhiyuan

@spacewander
Copy link
Member

when we create a route with redirect plugin, does it still need enable_websocket param?

We don't need it.

@liuxiran
Copy link
Contributor

liuxiran commented Aug 9, 2021

when we create a route with redirect plugin, does it still need enable_websocket param?

We don't need it.

Thanks a lot @spacewander

then we have to update two points:

  1. when we bind service to a Route, we should pass enable_websocket normally to API.
    this can be tested by recheck enable_websocket value in the configure view

  2. when we enable redirect in a Route, we should omit enable_websocket field in the create/configure step1.
    this can be tested by
    2.1. when we enable direct, enable_websocket should not exist in the step1
    2.2 when we recheck the Route in the configure page, enable_websocket still not existed.

@Baoyuantop

cc @juzhiyuan

@juzhiyuan
Copy link
Member

OK

@Baoyuantop
Copy link
Contributor

when we create a route with redirect plugin, does it still need enable_websocket param?

We don't need it.

Thanks a lot @spacewander

then we have to update two points:

  1. when we bind service to a Route, we should pass enable_websocket normally to API.
    this can be tested by recheck enable_websocket value in the configure view
  2. when we enable redirect in a Route, we should omit enable_websocket field in the create/configure step1.
    this can be tested by
    2.1. when we enable direct, enable_websocket should not exist in the step1
    2.2 when we recheck the Route in the configure page, enable_websocket still not existed.

@Baoyuantop

cc @juzhiyuan

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants