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

fix: default routes include well-known URIs with several path segments #223

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

gobengo
Copy link
Contributor

@gobengo gobengo commented Sep 24, 2024

RFC6920 defines some well-known routes like:

http://example.com/.well-known/ni/sha-256/f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk

Note that there are three path segments after the /.well-known/ path prefix.

In my honox /app directory, I crated /app/routes/.well-known/ni/[alg]/[val].tsx but it didn't work. (it does work if I directly nest at /app/routes/.well-known/[val].tsx).

Based on cursory local testing of this change. I think this change accomodates for several path segments beyond /.well-known/ as well as only one.

[RFC6920 defines](https://www.rfc-editor.org/rfc/rfc6920.html#section-8.1) some well-known routes like:

http://example.com/.well-known/ni/sha-256/f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk

Note that there are three path segments after the `/.well-known/` path prefix.

In my honox /app directory, I crated `/app/routes/.well-known/ni/[alg]/[val].tsx` but it didn't work. (it does work if I directly nest at `/app/routes/.well-known/[val.tsx]`).

Based on cursory local testing of this change. I think this change accomodates for several path segments beyond `/.well-known/` as well as only one.
@gobengo
Copy link
Contributor Author

gobengo commented Sep 24, 2024

wdyt @yusukebe ?

@yusukebe
Copy link
Member

@gobengo

I'll check it later.

@yusukebe yusukebe changed the title default routes include well-known URIs with several path segments fix: default routes include well-known URIs with several path segments Sep 25, 2024
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

@gobengo

Thanks! Looks good to me!

@yusukebe yusukebe merged commit 84781c2 into honojs:main Sep 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants