在 wildfly 中配置 http 到 https 重定向

Configure http to https redirection in wildfly

我在我的 Wildfly 10.1.0 服务器上部署了一个 myapp.war,所有 http 请求都使用 8443 端口重定向到 https。

Wildfly 中是否有针对特定 URL 设置例外的配置?

例如,我想要 http://localhost:8080/myapp/unprotected doesn't redirect to https://localhost:8443/myapp/unprotected

谢谢,

您按照 The Java EE 6 Tutorial, Volume I 中所述指定安全约束。

一个用于受保护的资源,一个用于不受保护的资源。对于后者,您省略了 user-data-constraint.