在我的 .net 核心应用程序的日志中,我可以看到所有请求的 URL 前面都带有反斜杠。该应用程序使用 .net core 2.0 托管在 Amazon Linux 2 上。这是请求中使用 url 的方式:http://www.mvc.meetcorepoint.com/
这是 .net core 接收到的 url http://\www.mvc.meetcorepoint.com/
。这是日志的一部分,也显示了其他 url:
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
dotnet-ids.mvc[22185]: Request starting HTTP/1.1 GET http://\www.mvc.meetcorepoint.com/
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
dotnet-ids.mvc[22185]: Executing action method MvcClient.Controllers.HomeController.Index (MvcClient) with arguments ((null)) -
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
dotnet-ids.mvc[22185]: Executing ViewResult, running view at path /Views/Home/Index.cshtml.
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
dotnet-ids.mvc[22185]: Executed action MvcClient.Controllers.HomeController.Index (MvcClient) in 0.5249ms
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
dotnet-ids.mvc[22185]: Request finished in 0.7982ms 200 text/html; charset=utf-8
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
dotnet-ids.mvc[22185]: Request starting HTTP/1.1 GET http://\www.mvc.meetcorepoint.com/lib/bootstrap/dist/css/bootstrap.css
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
dotnet-ids.mvc[22185]: Sending file. Request path: '/lib/bootstrap/dist/css/bootstrap.css'. Physical path: '/var/www/dotnet/ids
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
dotnet-ids.mvc[22185]: Request finished in 1.6629ms 200 text/css
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
dotnet-ids.mvc[22185]: Request starting HTTP/1.1 GET http://\www.mvc.meetcorepoint.com/css/site.css
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
dotnet-ids.mvc[22185]: Sending file. Request path: '/css/site.css'. Physical path: '/var/www/dotnet/ids.mvc/wwwroot/css/site.cs
dotnet-ids.mvc[22185]: info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
dotnet-ids.mvc[22185]: Request finished in 0.3626ms 200 text/css