Skip to content

Commit 37feebf

Browse files
committed
Reversing array merge to avoid overwrites of default headers
1 parent abc1f5b commit 37feebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authentication/JWT.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $he
132132
$header['kid'] = $keyId;
133133
}
134134
if ( isset($head) && is_array($head) ) {
135-
$header = array_merge($header, $head);
135+
$header = array_merge($head, $header);
136136
}
137137
$segments = array();
138138
$segments[] = JWT::urlsafeB64Encode(JWT::jsonEncode($header));

0 commit comments

Comments
 (0)