surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.06k stars 81 forks source link

Fail to connect to a surreal instance exposed under a subpath #191

Closed morganlefloch closed 3 months ago

morganlefloch commented 4 months ago

Describe the bug It seams like Surrealist currently doesn't handle connecting to a surrealDB instance hosted under a path (e.g. http://myserver.dev/surrealdb). Looking at the web console, under network tab, the websocket connection endpoint is ws://myserver.dev/rpc instead of ws://myserver.dev/surreal/rpc.

To Reproduce Steps to reproduce the behavior:

  1. Expose a surrealDB instance under a subpath
  2. Try to connect to it with Surrealist
  3. Connection error

Expected behavior A connection to ws://example.com/surreal/rpc is expected instead of ws://example.com/rpc

Environment (you can view the current version under Settings):

macjuul commented 3 months ago

This should be possible again as of a recent release

EtienneBruines commented 3 months ago

Are we sure this is fixed @macjuul ? The current version (v2.0.6 desktop) as well as the surrealist.app website seem to still connect to /version regardless of the (sub)path I add to the URL. (Instead of something like /surreal/version or /surreal/rpc/version or whatever the correct path would be.)

macjuul commented 3 months ago

My bad! I thought it was included in the previous release but it looks like I forgot to include it 😅 It will be in the next release though!

EtienneBruines commented 3 months ago

My apologies @macjuul - #251 was merged and available from 2.0.5 onwards. You did everything correctly :smile:

Seems like my haproxy logic was wrong. (I was handling /rpc but not /version myself...)