mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
d20ab50f9d
BUG Fix up test regressions FIX director references to request object API Move all middlewares to common namespace API Implement RequestHandlerMiddlewareAdapter ENHANCEMENT Improve IP address parsing Fix up PHPDoc / psr2 linting BUG Fix property parsing in TrustedProxyMiddleware BUG Fix Director::is_https()
23 lines
580 B
PHP
23 lines
580 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Control\Middleware;
|
|
|
|
use SilverStripe\Control\HTTPRequest;
|
|
use SilverStripe\Control\HTTPResponse;
|
|
|
|
/**
|
|
* HTTP Request middleware
|
|
* Based on https://github.com/php-fig/fig-standards/blob/master/proposed/http-middleware/middleware.md#21-psrhttpservermiddlewaremiddlewareinterface
|
|
*/
|
|
interface HTTPMiddleware
|
|
{
|
|
/**
|
|
* Generate response for the given request
|
|
*
|
|
* @param HTTPRequest $request
|
|
* @param callable $delegate
|
|
* @return HTTPResponse
|
|
*/
|
|
public function process(HTTPRequest $request, callable $delegate);
|
|
}
|