Skip to content

Commit

Permalink
Better support for Swoole Runtime (#191)
Browse files Browse the repository at this point in the history
Co-authored-by: Björn Dieding <[email protected]>
  • Loading branch information
Steveb-p and xrow authored Jan 11, 2023
1 parent 5a0f2a9 commit 6554f05
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public function onKernelRequest(RequestEvent $event)
}

$request = $event->getRequest();

// Not every symfony runtime provides SCRIPT_FILENAME
if (!$request->server->has('SCRIPT_FILENAME')) {
return;
}

$scriptFileName = preg_quote(basename($request->server->get('SCRIPT_FILENAME')), '\\');
// This pattern has to match with vhost.template files in meta repository
$pattern = sprintf('<^/([^/]+/)?%s([/?#]|$)>', $scriptFileName);
Expand Down

0 comments on commit 6554f05

Please sign in to comment.