-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support .well-known serving in handlers #1087
Comments
Doh. It's enough to add a context mapped to One such context could serve for multiple virtual hosts. |
@sbordet and @WalkerWatch would it be worth documenting this? I can imagine this being a pretty common setup. |
I think we should create a |
Interestingly, the concept of |
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions. |
From a Perhaps something like I didn't suggest ``${jetty.base}/webapps/.well-known/ We could make that specific directory If we go this route, should we allow directory listing by default? For embedded-jetty, a |
I don't think we need anything special, this XML file is enough: <Configure class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="contextPath">/.well-known</Set>
<Set name="handler">
<New class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set name="resourceBase">/your/directory/.well-known</Set>
<Set name="directoriesListed">false</Set>
</New>
</Set>
</Configure> I guess it's only a documentation issue, and perhaps an example in |
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to it having no activity. |
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Issue #1087 - add module for a .well-known handler
The
.well-known
directory is being used for more and more things to automate operations related to websites.For example, see #794.
Also, Let's Encrypt uses the
.well-known
directory to automate the issue of certificates.For "normal" contexts, this is rather easy, since it's enough to add the
.well-known
directory to theresourceBase
and it's done.For less "normal" contexts, this is not doable.
For example, a
MovedContextHandler
would need to be able to serve content under.well-known
and if that fails, fall back to the "moved" behavior.Same goes for contexts that use a
RedirectHandler
.The major problem is trying to serve the "/" URI.
Currently, a handler that has a
resourceBase
will try to serve/
as a directory, or give a 403 if directory listing is not allowed.What would be needed is a handler with some logic along these lines:
/.well-known
and descendants => serve it like aResourceHandler
would from file system/
=> forward to next/wrapped handlerSo that is basically a
ResourceHandler
, but only for a particular directory (or set of paths).If there are ways to achieve this, will be great to know.
The text was updated successfully, but these errors were encountered: