Skip to content

Commit ae153c1

Browse files
committed
Use getallheaders
This is an alias for apache_request_headers(), but is a little better named.
1 parent 17bc9c6 commit ae153c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/class-wp-json-authentication-oauth1.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public function get_authorization_header() {
6565
return wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] );
6666
}
6767

68-
if ( function_exists( 'apache_request_headers' ) ) {
69-
$headers = apache_request_headers();
68+
if ( function_exists( 'getallheaders' ) ) {
69+
$headers = getallheaders();
7070

7171
// Check for the authoization header case-insensitively
7272
foreach ( $headers as $key => $value ) {

0 commit comments

Comments
 (0)