3.0.0 Beta 8
Pre-release
Pre-release
- Added two static constructors for
SocketHttpServer
createForDirectAccess()
— Creates an instance appropriate for direct access by the publiccreateForBehindProxy()
— Creates an instance appropriate for use when behind a proxy service such as nginx'
- The constructor of
SocketHttpServer
has changed to require an instance ofServerSocketFactory
andClientFactory
, as well as accepting an array of middleware and a list of allowed HTTP methods. UseSocketHttpServer::createForDirectAccess()
to create a server with similar defaults as the previous constructor. - Added
ForwardedMiddleware
and associatedForwarded
class andForwardedHeaderType
enum. This middleware parses eitherForwarded
orX-Forwarded-For
headers to determine the original client address when used behind a proxy supporting these headers. - Added
AllowedMethodsMiddleware
which limits the allowed HTTP verbs used by requests. This middleware is used automatically bySocketHttpServer
. The allowed methods can be specified through a constructor parameter, using null to disable the middleware. - Removed the
$allowedMethods
argument from the constructors ofHttpDriverFactory
,Http1Driver
, andHttp2Driver
since this functionality is now handled by the middleware above. - Added query-related methods to
Request
to get individual query keys in a manner similar to headers.