【发布时间】:2015-03-11 12:25:52
【问题描述】:
如何在 Undertow 中配置 HTTP->HTTPS 重定向?我查看了 Undertow 的代码库,有些类似乎是相关的(例如 RedirectHandler)。此外,Undertow 文档 (Predicates Attributes and Handlers) 似乎正是针对这个问题。但我不知道从哪里开始。
基本上,我正在寻找的是 Apache 的 mod_rewrite 配置的对应物:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
谢谢!
【问题讨论】: