Skip to content

Commit f322168

Browse files
committed
fix(multitenancy): default to disallow anonymous tenants
1 parent 1a9ce54 commit f322168

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CleanArchitecture.Extensions.Multitenancy/Configuration/MultitenancyOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public sealed class MultitenancyOptions
1414
/// Gets or sets a value indicating whether tenant-less requests are allowed when explicitly marked optional.
1515
/// When false, optional requirements are treated as required.
1616
/// </summary>
17-
public bool AllowAnonymous { get; set; } = true;
17+
public bool AllowAnonymous { get; set; } = false;
1818

1919
/// <summary>
2020
/// Gets or sets a fallback tenant used when no tenant is resolved.

src/CleanArchitecture.Extensions.Multitenancy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public sealed class GetTenantSummaryHandler
163163
builder.Services.Configure<MultitenancyOptions>(options =>
164164
{
165165
options.RequireTenantByDefault = true;
166-
options.AllowAnonymous = true;
166+
options.AllowAnonymous = false;
167167
options.ResolutionOrder = new List<TenantResolutionSource>
168168
{
169169
TenantResolutionSource.Route,

0 commit comments

Comments
 (0)