0
使用4.0.31预期,我APPHOST配置方法声明如下:Servicestack扬鞭UI端点行为不与UseHttpsLinks
public override void Configure(Funq.Container container)
{
HostConfig hc = new HostConfig()
{ HandlerFactoryPath = "api", UseHttpsLinks = true };
SetConfig(hc);
Plugins.Add(new CorsFeature());
Plugins.Add(new SwaggerFeature());
...
}
我的印象是,这将设置招摇的UI到url下是../api/resources的HTTPS版本,但我仍然得到了普通的HTTP端点招摇URL文本框,如:
http://example.com/myapp/api/resources
我们的网站服务器都落后执行SSL卸载负载均衡(并且需要SSL),所以URL应该是:
https://example.com/myapp/api/resources
从积极的方面,用“UseHttpsLinks”实际上允许一旦你解决端点url招摇的用户界面的功能。没有它,它根本就不起作用!
我使用替代index.html通过Virtual File System作为黑客重写了swagger url属性 - 因为在开发,QA和分段环境中,url属性指向生产...(不是这样好)
太棒了,谢谢。 (其中有一天我实际上可能会问你一些你还没有想到的问题) – 2014-10-09 16:33:08