本文介绍了如何删除 ServiceStack 中的元数据重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 NuGet 安装了 ServiceStack,并且在 SetConfig 中添加了以下配置:

I have ServiceStack installed via NuGet, and I have added the following Config within SetConfig:

EnableFeatures = Feature.All.Remove(Feature.Metadata)

然而,它已经从/metadata 中删除了物理页面,每次我尝试访问根目录时,我仍然被重定向到/metadata.我在官方页面( https://github.com/ServiceStack/ServiceStack/wiki/Metadata-page" rel="nofollow">https://github.com/ServiceStack/ServiceStack/wiki/Metadata-page ) - 任何帮助将不胜感激!

which has removed the physical page from /metadata however, each time I try to hit the root, I am still redirected to /metadata. I could not see anything else allowing me to handle this on the official page ( https://github.com/ServiceStack/ServiceStack/wiki/Metadata-page ) - any help would be highly appreciated!

推荐答案

您可以为您的服务添加自己的 Default.html/.cshtml/etc 主页,也可以在 DefaultRedirectPath 中指定或 MetadataRedirectPath"nofollow">EndpointHostConfig.

You can add your own Default.html/.cshtml/etc home page for your services or you can specify the in the DefaultRedirectPath or MetadataRedirectPath in the EndpointHostConfig.

这篇关于如何删除 ServiceStack 中的元数据重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 16:05