igalklebanov / kysely-surrealdb

Kysely dialects, plugins and other goodies for SurrealDB
MIT License
68 stars 2 forks source link

fixes `resolveBasePath` for `127.0.0.1` #13

Closed sonicjhon1 closed 1 year ago

sonicjhon1 commented 1 year ago

Using 127.0.0.1 instead of using localhost currently throws the following error:

Error: write EPROTO FC630000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:355:

    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
  errno: -4046,
  code: 'EPROTO',
  syscall: 'write'
}

This is because currently everything that isn't localhost will use the https protocol, which means that 127.0.0.1 would also use the https protocol. This PR adds an exception to 127.0.0.1 too, which fixes the issue.

Closes: #11