Is it possible to customize the ServiceStack /metadata page?

后端 未结 3 1073
轻奢々
轻奢々 2020-12-19 04:29

I run my site behind a loadbalancer on a non-standard port. When loading up the /metadata page it has my public domain name yet the local port that the app is hosted on, wh

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-19 04:49

    The Service Stack Metadata page is fully customizable. You can use attributes to annotate specific properties or services whilst retaining the auto-generated content.

    The content is delivered using embedded HTML templates and this can also be replaced for detailed customization.

    The metadata pages can be completely turned off, which is what I typically do, using the following snippet.

    SetConfig(new HostConfig { 
    EnableFeatures = Feature.All.Remove(Feature.Metadata) });
    

    Further details can be found from Service Stack Wiki.

提交回复
热议问题