【问题标题】:how to change net core router prefix如何更改网络核心路由器前缀
【发布时间】:2020-05-30 03:09:04
【问题描述】:

我有部署在 linux 上的 net core 应用程序,如何通过配置更改路由器 api 前缀。 就像这样https://localhost/api/index --> https://localhost/appName/api/index。 如何将 appname 添加到路由器而不更改代码。

【问题讨论】:

    标签: asp.net-core


    【解决方案1】:

    在您的 StartUp 配置文件中更改路由以添加您的 AppName。有几种方法可以做到这一点(取决于您的应用程序是 Web API 还是 MVC)。大家可以找到here

    【讨论】:

    • @honore 这是什么意思?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-13
    • 1970-01-01
    • 1970-01-01
    • 2018-04-20
    • 2019-06-23
    • 2015-09-07
    • 1970-01-01
    相关资源
    最近更新 更多