Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 110 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

redirect_middleware:: (5 methods):
  setup()
  __construct()
  set_security()
  __invoke()
  modifyRequest()


Class: redirect_middleware  - X-Ref

Class to check that each URL is valid in a redirect.

setup(array $settings)   X-Ref
Setup method for the redirect middleware.

param: array $settings The settings of the request
return: callable

__construct(callable $next, array $settings)   X-Ref
Redirect middleware constructor.

param: callable(RequestInterface, array): PromiseInterface $next The next handler to invoke
param: array $settings The options from the client

set_security(curl_security_helper_base $securityhelper)   X-Ref
Set the security according to settings.

param: curl_security_helper_base $securityhelper
return: void

__invoke(RequestInterface $request, array $options)   X-Ref
Curl security setup.

param: RequestInterface $request The interface of the request
param: array $options The options for the request
return: PromiseInterface

modifyRequest(RequestInterface $request, array $options, ResponseInterface $response)   X-Ref
No description