Middleware for snicco/http-routing
to redirect request with a trailing slash.
composer require snicco/trailing-slash-middleware
This middleware should be added globally or in a middleware group.
By default, this middleware will redirect requests with a trailing slash in the URL path to
the same path without the trailing slash, ie: /foo/ => '/foo
If the opposite behaviour is desired you can pass (bool) false
to the constructor.
$configurator->get('route1', '/route1', SomeController::class)
->middleware(Snicco\Middleware\TrailingSlash\TrailingSlash::class);
This repository is a read-only split of the development repo of the Snicco project.
This is how you can contribute.
Please report issues in the Snicco monorepo.
If you discover a security vulnerability, please follow our disclosure procedure.