-
|
Title. Is that possible? I tried to use this to serve a server using Hono on Deno, but all paths end up with the prefix Any ideas/solution to this? Here is the code in question and why I'm asking this in the first place: iv-org/invidious-companion#105 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @Fijxu, Thanks for the feedback. When using a Unix domain socket with
Hono does not support this scheme, so it appears to be processed as a path that differs from the original intent. We will consider whether to support this scheme in Hono’s default const app = new Hono({
getPath: (req) => new URL(req.url).pathname
})
app.get('/', (c) => {
return c.text('Hello Hono!')
})
Deno.serve(
{
path: '/tmp/socket.sock',
},
app.fetch
) |
Beta Was this translation helpful? Give feedback.
Hi @Fijxu, Thanks for the feedback.
When using a Unix domain socket with
Deno.serve, the following string is passed asrequest.url.http+unix://%2Ftmp%2Fsocket%2Esock/your/pathHono does not support this scheme, so it appears to be processed as a path that differs from the original intent.
We will consider whether to support this scheme in Hono’s default
getPath(), but in the current version, you can process URLs using this scheme by specifyinggetPath()as follows.