Skip to content

[READ ONLY] Subtree split of the snicco/trailing-slash-middleware package (see snicco/snicco).

License

Notifications You must be signed in to change notification settings

snicco/trailing-slash-middleware

Repository files navigation

Middleware for snicco/http-routing to redirect request with a trailing slash.

codecov Psalm Type-Coverage Psalm level PhpMetrics - Static Analysis PHP-Versions

Installation

composer require snicco/trailing-slash-middleware

Usage

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);

Contributing

This repository is a read-only split of the development repo of the Snicco project.

This is how you can contribute.

Reporting issues and sending pull requests

Please report issues in the Snicco monorepo.

Security

If you discover a security vulnerability, please follow our disclosure procedure.

About

[READ ONLY] Subtree split of the snicco/trailing-slash-middleware package (see snicco/snicco).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages