We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 26091f7 + 6c5e85a commit 0865487Copy full SHA for 0865487
libs/csrf/csrfprotector.php
@@ -267,10 +267,10 @@ private static function getTokenFromRequest()
267
return $_POST[self::$config['CSRFP_TOKEN']];
268
}
269
270
- if (function_exists('apache_request_headers')) {
271
- $apacheRequestHeaders = apache_request_headers();
272
- if (isset($apacheRequestHeaders[self::$config['CSRFP_TOKEN']])) {
273
- return $apacheRequestHeaders[self::$config['CSRFP_TOKEN']];
+ if (function_exists('getallheaders')) {
+ $requestHeaders = getallheaders();
+ if (isset($requestHeaders[self::$config['CSRFP_TOKEN']])) {
+ return $requestHeaders[self::$config['CSRFP_TOKEN']];
274
275
276
0 commit comments