Skip to content

Commit

Permalink
Fix firewall preventing access to the profiler in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval authored and cedric-anne committed Nov 14, 2024
1 parent 51aae47 commit 4b1be4a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Glpi/Http/Firewall.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ public function computeFallbackStrategy(Request $request): string
private function computeFallbackStrategyForCore(string $path): string
{
if (!file_exists($this->root_dir . $path)) {
$paths = [
'/_wdt/' => self::STRATEGY_NO_CHECK,
'/_profiler/' => self::STRATEGY_NO_CHECK,
];
foreach ($paths as $checkPath => $strategy) {
if (\str_starts_with($path, $checkPath)) {
return $strategy;
}
}

// Modern controllers
return self::FALLBACK_STRATEGY;
}
Expand Down

0 comments on commit 4b1be4a

Please sign in to comment.