首页 > 解决方案 > 代理的 launchSettings.json 应用程序 url

问题描述

我试图代理对我的 api localhost 做出反应。这是 launchsettings.json 的样子

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:63701",
      "sslPort": 44318
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "ByeBug_API": {
      "commandName": "Project",
      "launchBrowser": true,
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

我一直无法做到。其中哪一个是 api 运行的,所以我可以用我的 React 访问它?你会认为是"sslPort": 44318,但它不起作用

标签: reactjsasp.net-coreasp.net-core-webapi

解决方案


推荐阅读