From 365fa76db323509aabfeb037afec72772c5fa6a5 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Thu, 12 May 2022 17:36:14 +1000 Subject: [PATCH] Issue #1771 - add module for secure redirect Signed-off-by: Lachlan Roberts --- .../main/config/etc/jetty-secure-redirect.xml | 22 +++++++++++++++++++ jetty-server/src/main/config/etc/jetty.xml | 2 +- .../main/config/modules/secure-redirect.mod | 17 ++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 jetty-server/src/main/config/etc/jetty-secure-redirect.xml create mode 100644 jetty-server/src/main/config/modules/secure-redirect.mod diff --git a/jetty-server/src/main/config/etc/jetty-secure-redirect.xml b/jetty-server/src/main/config/etc/jetty-secure-redirect.xml new file mode 100644 index 000000000000..3e2d14aca73f --- /dev/null +++ b/jetty-server/src/main/config/etc/jetty-secure-redirect.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/jetty-server/src/main/config/etc/jetty.xml b/jetty-server/src/main/config/etc/jetty.xml index b2d16df274c0..423c63b04488 100644 --- a/jetty-server/src/main/config/etc/jetty.xml +++ b/jetty-server/src/main/config/etc/jetty.xml @@ -60,7 +60,7 @@ - + diff --git a/jetty-server/src/main/config/modules/secure-redirect.mod b/jetty-server/src/main/config/modules/secure-redirect.mod new file mode 100644 index 000000000000..6a300b862506 --- /dev/null +++ b/jetty-server/src/main/config/modules/secure-redirect.mod @@ -0,0 +1,17 @@ +DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Enable SecuredRedirectHandler to redirect all http requests to https. + +[tags] +handler + +[depend] +server + +[xml] +etc/jetty-secure-redirect.xml + +[ini-template] +## The redirect code to use in the response. +# jetty.redirect.code=302