Taadis.AspNetCore.Middlewares.RequestIp 2.1.0

dotnet add package Taadis.AspNetCore.Middlewares.RequestIp --version 2.1.0                
NuGet\Install-Package Taadis.AspNetCore.Middlewares.RequestIp -Version 2.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Taadis.AspNetCore.Middlewares.RequestIp" Version="2.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Taadis.AspNetCore.Middlewares.RequestIp --version 2.1.0                
#r "nuget: Taadis.AspNetCore.Middlewares.RequestIp, 2.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Taadis.AspNetCore.Middlewares.RequestIp as a Cake Addin
#addin nuget:?package=Taadis.AspNetCore.Middlewares.RequestIp&version=2.1.0

// Install Taadis.AspNetCore.Middlewares.RequestIp as a Cake Tool
#tool nuget:?package=Taadis.AspNetCore.Middlewares.RequestIp&version=2.1.0                

Taadis.AspNetCore.Middlewares

获取

使用

  • 通过Visual Studio IDE新建一个空的ASP.NET Core Web 应用程序项目
  • 获取包
  • 在项目的Startup.cs启动类中添加如下中间配置:
// Startup.cs

// 不要忘了补充 using
using Taadis.AspNetCore.Middlewares.RequestIp;

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    // ...

    // 通过 IApplicationBuilder 扩展方法配置中间件
    app.UseRequestIp();

    // ...
}
  • 启动项目,并访问,即可在控制台/输出面本看到类似如下内容:
User IP:::1

NuGet包版本约定

发布的NuGet包的版本遵循以下约定:

  • 大版本同.NET Core版本保持一致
  • 小版本按发布顺序递增
  • 至于接口的兼容性,尽量保持,建议使用最新版本即可.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 1,008 7/5/2018