X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=img_auth.php;h=44ef0a16627dff7693cb691af3513c28b08c7f05;hp=6e45e4eba5a63af69742d7fa31635f81f8b5d33d;hb=18c2d20c54f9851af639cb24603493ca197baaa8;hpb=e4ce770cbd8938aff9bc4a008815f7cf380fbfd8 diff --git a/img_auth.php b/img_auth.php index 6e45e4eba5..44ef0a1662 100644 --- a/img_auth.php +++ b/img_auth.php @@ -39,6 +39,7 @@ */ define( 'MW_NO_OUTPUT_COMPRESSION', 1 ); +define( 'MW_ENTRY_POINT', 'img_auth' ); require __DIR__ . '/includes/WebStart.php'; # Set action base paths so that WebRequest::getPathInfo() @@ -96,8 +97,10 @@ function wfImageAuthMain() { } if ( $be->fileExists( [ 'src' => $filename ] ) ) { wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." ); - $be->streamFile( [ 'src' => $filename ], - [ 'Cache-Control: private', 'Vary: Cookie' ] ); + $be->streamFile( [ + 'src' => $filename, + 'headers' => [ 'Cache-Control: private', 'Vary: Cookie' ] + ] ); } else { wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $path ); }