【发布时间】:2013-07-16 07:47:57
【问题描述】:
我正在尝试获取它,以便对以下任何请求:
http://<myserver>:1234
被重定向到:
https://<myserver>:1234
我尝试在模块中使用“this.RequiresHttps()”,但是当我点击 url http://<myserver>:1234 时,浏览器只是旋转,我猜这是因为我没有使用 NancyHost 构造HTTP URI。我无法将 HTTP URI 与 HTTPS URI 一起添加到 NancyHost,如下所示:
var host = new NancyHost(new Uri("http://localhost:1234"), new Uri("https://localhost:1234"));
因为我会遇到注册冲突。
有什么想法吗?
【问题讨论】:
标签: http redirect https nancy self-hosting