Manual:Hooks/ImgAuthModifyHeaders
Appearance
From mediawiki.org
| ImgAuthModifyHeaders | |
|---|---|
| Available from version 1.34.0 (Gerrit change 496705) Executed just before a file is streamed to a user, allowing headers to be modified beforehand. | |
| Define function: | public static function onImgAuthModifyHeaders( \MediaWiki\Linker\LinkTarget $title, array &$headers ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "ImgAuthModifyHeaders":"MediaWiki\\Extension\\MyExtension\\Hooks::onImgAuthModifyHeaders" } } |
| Called from: | File(s): ../img_auth.php Function(s): wfImageAuthMain |
| Interface: | ImgAuthModifyHeadersHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ImgAuthModifyHeaders extensions.
Details
[edit ]$title:MediaWiki\Linker\LinkTargetinstance&$headers: Associative array of HTTP headers