Skip to content

snicco/trailing-slash-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

 
 
 

Contributors

Languages