Skip to content

Commit

Permalink
Make sure root route, only contains one slash
Browse files Browse the repository at this point in the history
  • Loading branch information
firecow committed May 4, 2023
1 parent 5d529c8 commit 4f4664a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public function handle(RequestReceived $event): void
/** @var OctaneApmManager $manager */
$manager = $event->app->make(OctaneApmManager::class);

$manager->beginTransaction($event->request->method() . ' /' . $this->getRouteUri($event), 'request');
$routeUri = $this->getRouteUri($event);
if ($routeUri === "/") {
$manager->beginTransaction($event->request->method() . ' /', 'request');
} else {
$manager->beginTransaction($event->request->method() . ' /' . $routeUri, 'request');
}
}

/**
Expand Down

0 comments on commit 4f4664a

Please sign in to comment.