Quantcast
Channel: How to send a permanent (301) redirect from HTTP to HTTPS in Jetty 9 - Server Fault
Viewing all articles
Browse latest Browse all 2

How to send a permanent (301) redirect from HTTP to HTTPS in Jetty 9

$
0
0

After following the suggestion on How to have Jetty redirect http to https, we were able to get our standalone Jetty deployment to redirect all HTTP requests to HTTPS. The redirect however is a 302. How can we make this a 301 (permanent) redirect instead?

For reference, we added this to Jetty's etc/webdefault.xml:

<web-app>  ...<security-constraint><web-resource-collection><web-resource-name>Everything in the webapp</web-resource-name><url-pattern>/*</url-pattern></web-resource-collection><user-data-constraint><transport-guarantee>CONFIDENTIAL</transport-guarantee></user-data-constraint></security-constraint></web-app>

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images