是否可以在与使用nginx的同一主机中的MVC客户端相同的URL上运行Identity Server 4?例如,Identity Server将在localhost / api上的localhost / id /和mvc客户端上运行
在MVC客户端中有端口5000.我可以轻松地将其更改为http://localhost/id
services.AddAuthentication(options =>
{
options.DefaultScheme = "Cookies";
options.DefaultChallengeScheme = "oidc";
})
.AddCookie("Cookies")
.AddOpenIdConnect("oidc", options =>
{
options.SignInScheme = "Cookies";
options.Authority = "http://localhost:5000"; // <== HERE
options.RequireHttpsMetadata = false;
options.ClientId = "mvc";
options.ClientSecret = "secret";
options.ResponseType = "code id_token";
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.Scope.Add("api1");
options.Scope.Add("offline_access");
});
但是,如何让Identity Server仅处理对localhost / id的请求? 我希望在asp.net应用程序中完成所有操作并且不要使用反向代理或其他任何东西