多租户示例更新

This commit is contained in:
administrator committed 2024-07-04 07:19:34 +08:00
1 parent 9a37f4b67f
commit dbabaaadba
3 files changed
+5 -7

No files matched your search

@@ -10,6 +10,11 @@ namespace MultiTenancySample.ServiceDefaults
const string tenantKey = "tenant";
if(httpContext.User.FindAll(tenantKey).Any())
{
return httpContext.User.FindFirst(tenantKey)?.Value;
}
if (httpContext.Request.Headers.TryGetValue(tenantKey, out var headerValues))
{
return headerValues.First();
-6
View File
@@ -1,6 +0,0 @@
{
"sdk": {
"version": "8.0.204",
"rollForward": "latestFeature"
}
}
@@ -21,7 +21,6 @@ namespace HelloShop.ProductService.FunctionalTests
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
}
[Fact]