File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
Bing.AspNetCore/Bing/AspNetCore/RealIp
Microsoft/Extensions/DependencyInjection Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11<Project >
22 <ItemGroup >
3- <PackageReference Include =" Bing.Utils.Http" Version =" 1.2.3 " />
3+ <PackageReference Include =" Bing.Utils.Http" Version =" 1.2.4 " />
44 </ItemGroup >
55
66 <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0' " >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public async Task InvokeAsync(HttpContext context)
4747 if ( headers . ContainsKey ( _options . HeaderKey ) )
4848 {
4949 context . Connection . RemoteIpAddress = IPAddress . Parse (
50- _options . HeaderKey . ToLower ( ) == "x-forwarded-for"
50+ _options . HeaderKey . Equals ( "x-forwarded-for" , StringComparison . CurrentCultureIgnoreCase )
5151 ? headers [ "X-Forwarded-For" ] . ToString ( ) . Split ( ',' ) [ 0 ]
5252 : headers [ _options . HeaderKey ] . ToString ( ) ) ;
5353
Original file line number Diff line number Diff line change @@ -60,17 +60,21 @@ public static IServiceProvider UseBing(this IServiceProvider serviceProvider)
6060 {
6161 var logger = serviceProvider . GetLogger ( FrameworkLog ) ;
6262 logger . LogInformation ( "Bing框架初始化开始" ) ;
63+ Console . WriteLine ( "Bing框架初始化开始" ) ;
6364 var watch = Stopwatch . StartNew ( ) ;
6465 var modules = serviceProvider . GetServices < BingModule > ( ) . ToArray ( ) ;
6566 foreach ( var module in modules )
6667 {
6768 var moduleName = Reflections . GetDescription ( module . GetType ( ) ) ;
6869 logger . LogInformation ( $ "正在初始化模块 “{ moduleName } ”") ;
70+ Console . WriteLine ( $ "正在初始化模块 “{ moduleName } ”") ;
6971 module . UseModule ( serviceProvider ) ;
7072 logger . LogInformation ( $ "模块 “{ moduleName } ” 初始化完成") ;
73+ Console . WriteLine ( $ "模块 “{ moduleName } ” 初始化完成") ;
7174 }
7275 watch . Stop ( ) ;
7376 logger . LogInformation ( $ "Bing框架初始化完毕,耗时:{ watch . Elapsed } ") ;
77+ Console . WriteLine ( $ "Bing框架初始化完毕,耗时:{ watch . Elapsed } ") ;
7478 return serviceProvider ;
7579 }
7680
Original file line number Diff line number Diff line change 66 <PackageReference Include =" System.Linq.Dynamic.Core" Version =" 1.2.9" />
77 <PackageReference Include =" System.Runtime.Loader" Version =" 4.3.0" />
88 <PackageReference Include =" System.Collections.Immutable" Version =" 5.0.0" />
9- <PackageReference Include =" Bing.Utils" Version =" 1.2.3 " />
9+ <PackageReference Include =" Bing.Utils" Version =" 1.2.4 " />
1010
1111 <PackageReference Include =" Microsoft.Extensions.Options.ConfigurationExtensions" Version =" $(MicrosoftPackageVersion)" />
1212 <PackageReference Include =" Microsoft.Extensions.DependencyModel" Version =" $(MicrosoftPackageVersion)" />
You can’t perform that action at this time.
0 commit comments