Skip to content

Commit

Permalink
fix: router headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Dec 3, 2024
1 parent e78162b commit 870d7b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/server/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@
$headersArray = parse_ini_file($headersFile, true);
// path with wildcard
foreach ($headersArray as $source => $headers) {
list($match) = sscanf($path, str_replace('*', '%s', $source));
if ($match !== null) {
$match = sscanf($path, str_replace('*', '%s', $source));
if (!empty($match) && $match[0] !== null) {
foreach ($headers as $key => $value) {
header("$key: $value");
}
Expand Down

0 comments on commit 870d7b5

Please sign in to comment.