-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7000 from eclipse/jetty-10.0.x-1087-WellKnown
Issue #1087 - add module for a .well-known handler
- Loading branch information
Showing
6 changed files
with
129 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...documentation/src/main/asciidoc/operations-guide/modules/module-well-known.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2021 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
[[og-module-well-known]] | ||
===== Module `well-known` | ||
|
||
The `well-known` Jetty module creates a `ResourceHandler` deployed at the `/.well-known` context path which serves files from a directory. | ||
By default, the directory created at `$JETTY_BASE/.well-known` is used, but it can be configured from `well-known.ini` to anywhere in the filesystem. | ||
Note that the `.well-known` directory may be seen as a hidden directory by the filesystem. | ||
|
||
The concept of well-known URIs has been defined in link:https://datatracker.ietf.org/doc/html/rfc5785[RFC5785]. | ||
This module can be used for things like the automatic renewal of link:https://letsencrypt.org/[Let's Encrypt] certificates. | ||
See link:https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml[IANA Well-Known URIs] for more possible examples of how this can be used. | ||
|
||
The module properties are: | ||
|
||
---- | ||
include::{JETTY_HOME}/modules/well-known.mod[tags=documentation] | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd"> | ||
|
||
<Configure id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"> | ||
<New id="WellKnownHandler" 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"> | ||
<Call name="resolvePath" class="org.eclipse.jetty.xml.XmlConfiguration"> | ||
<Arg><Property name="jetty.base"/></Arg> | ||
<Arg><Property name="jetty.wellknown.dir" default=".well-known"/></Arg> | ||
</Call> | ||
</Set> | ||
<Set name="directoriesListed">false</Set> | ||
</New> | ||
</Set> | ||
</New> | ||
|
||
<Call name="addHandler"> | ||
<Arg><Ref refid="WellKnownHandler"/></Arg> | ||
</Call> | ||
</Configure> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html | ||
|
||
[description] | ||
Serve static files from a directory for the "/.well-known" context path. | ||
|
||
[tags] | ||
handler | ||
|
||
[depend] | ||
server | ||
|
||
[xml] | ||
etc/well-known.xml | ||
|
||
[files] | ||
.well-known/ | ||
|
||
[ini-template] | ||
# tag::documentation[] | ||
## Well Known Directory (relative to $JETTY_BASE if relative path, otherwise it is an absolute path). | ||
# jetty.wellknown.dir=.well-known | ||
# end::documentation[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters