From 84781c281198fed441f68cb20ffe283526c8d0a9 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Wed, 25 Sep 2024 03:36:20 -0700 Subject: [PATCH] fix: default routes include well-known URIs with several path segments (#223) [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. --- src/server/with-defaults.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/with-defaults.ts b/src/server/with-defaults.ts index 1fc8392..9005738 100644 --- a/src/server/with-defaults.ts +++ b/src/server/with-defaults.ts @@ -33,7 +33,7 @@ export const createApp = (options?: ServerOptions) => { import.meta.glob( [ '/app/routes/**/!(_*|$*|*.test|*.spec).(ts|tsx|md|mdx)', - '/app/routes/.well-known/!(_*|$*|*.test|*.spec).(ts|tsx|md|mdx)', + '/app/routes/.well-known/**/!(_*|$*|*.test|*.spec).(ts|tsx|md|mdx)', ], { eager: true,