Altairis.TrailingSlashMiddleware
1.0.0
dotnet add package Altairis.TrailingSlashMiddleware --version 1.0.0
NuGet\Install-Package Altairis.TrailingSlashMiddleware -Version 1.0.0
<PackageReference Include="Altairis.TrailingSlashMiddleware" Version="1.0.0" />
paket add Altairis.TrailingSlashMiddleware --version 1.0.0
#r "nuget: Altairis.TrailingSlashMiddleware, 1.0.0"
// 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
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;
});
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 | Versions 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. |
-
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 | 174 | 3/5/2024 |