Altairis.TrailingSlashMiddleware 1.0.0

dotnet add package Altairis.TrailingSlashMiddleware --version 1.0.0                
NuGet\Install-Package Altairis.TrailingSlashMiddleware -Version 1.0.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="Altairis.TrailingSlashMiddleware" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Altairis.TrailingSlashMiddleware --version 1.0.0                
#r "nuget: Altairis.TrailingSlashMiddleware, 1.0.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 Altairis.TrailingSlashMiddleware as a Cake Addin
#addin nuget:?package=Altairis.TrailingSlashMiddleware&version=1.0.0

// Install Altairis.TrailingSlashMiddleware as a Cake Tool
#tool nuget:?package=Altairis.TrailingSlashMiddleware&version=1.0.0                

NuGet Status

Altairis. Trailing Slash Middleware

ASP.NET Core Middleware for adding or removing trailing slashes to URLs.

Usage

Add the middleware to your application in Program.cs:

app.UseTrailingSlashMiddleware();

This will remove trailing slashes from all URLs; incoming requests with trailing slashes will be redirected to the same URL without the trailing slash using permanent redirect with preserving HTTP method and query string.

You can change this behavior by providing options (the following are defaults):

builder.Services.AddTrailingSlashMiddleware(options => {
    options.Mode = TrailingSlashMiddlewareMode.Remove;
    options.PermanentRedirect = true;
    options.PreserveMethod = true;
});

Logo Altairis

Contributor Code of Conduct

This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.

For more information please visit the No Code of Conduct homepage.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

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
1.0.0 161 3/5/2024