honojs / honox

HonoX - Hono based meta framework
https://hono.dev
MIT License
1.4k stars 38 forks source link

routing for .well-known is 404 #179

Closed Jxck closed 4 months ago

Jxck commented 4 months ago

What version of HonoX are you using?

0.1.17

What steps can reproduce the bug?

create app/routes/.well-known/security.txt.tsx as below

import { createRoute } from "honox/factory"

export default createRoute(async (c) => {
  return c.text(
    `
Contact: ${c.env.ContactEmail}
Expires: 2025-12-31T14:55:00.000Z
    `.trim()
  )
})

and access to https://host.example/.well-known/security.txt returns 404

but renaming directory to app/routes/well-known/security.txt.tsx (removing . from well-known) and accessing https://host.example/well-known/security.txt returns 200 as expected.

It seems that, name based routing failed with prefix of . for well-known.

FYI: .well-known/ is important path for serving various of standard defined files. https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

yusukebe commented 4 months ago

Hi @Jxck

This was fixed. You can try the new version 0.1.18 that includes the fix. Thanks!