https 连接子域 URL 更改
https 连接子域
我希望使用 HTTPS 设置我的 wickets 1.5 应用程序。
我已将以下内容添加到我的应用程序类中。
setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443)));
mountPage("/go/securepage", securePage.class);
正如我用 "@RequireHttps"
注释 securePage.class 一样,链接正确地使用 HTTPS 加载页面。
但是我想将所有 https 连接转发到一个单独的子域。
不会转到 https://www.example.com/go/securepage
,而是
因此,用户 被转发到 https://securepage.example.com/go/securepage
如何做到这一点?
Https Connection subdomain
Im Looking to set up my wickets 1.5 application with HTTPS.
I have added the following to my Application Class.
setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443)));
mountPage("/go/securepage", securePage.class);
As i have annotated the securePage.class with "@RequireHttps"
the Link correctly loads the page with HTTPS.
However i want to forward all https connections to a seperate subdomain.
So instead of going to
https://www.example.com/go/securepage
the user is forwarded tohttps://securepage.example.com/go/securepage
How can this be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我从来不需要这样做,但查看
HttpsMapper
看来我们可以通过覆盖HttpsMapper.mapHandler()
。因此,您可以像这样覆盖它:
I've never needed to do this, but looking at the sources of
HttpsMapper
it seems you will we able to do this by overridingHttpsMapper.mapHandler()
.So, you can override it like this: