Skip to content

Commit 7e79d8f

Browse files
committed
fix: 主界面打开的时候不需要登录
1 parent 041325f commit 7e79d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MaiChartManager/AuthenticationMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public AuthenticationMiddleware(RequestDelegate next)
1111

1212
public async Task Invoke(HttpContext context)
1313
{
14-
if (!context.User.Identity.IsAuthenticated)
14+
if (!context.User.Identity.IsAuthenticated && context.Connection.LocalPort == 5001)
1515
{
1616
context.Response.StatusCode = StatusCodes.Status401Unauthorized;
1717
context.Response.Headers.Append("WWW-Authenticate", "Basic");

0 commit comments

Comments
 (0)