Browse Source

simplify construction

nex-php
yggverse 7 months ago
parent
commit
348d4940d3
  1. 8
      src/nex.php

8
src/nex.php

@ -185,15 +185,15 @@ $server->start(
// Filter goal request // Filter goal request
$goal = preg_replace( $goal = preg_replace(
[ [
'/\\\/', // unify separators
'/(^|\/)[\.]+/', // hidden items started with dot '/(^|\/)[\.]+/', // hidden items started with dot
'/[\.]+\//', // relative directory paths '/[\.]+\//', // relative directory paths
'/[\/]+\//', // remove extra slashes '/[\/]+\//', // remove extra slashes
], ],
DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR,
NEXT_PATH . trim( NEXT_PATH . filter_var(
str_replace( $request,
'\\', '/', filter_var($request, FILTER_SANITIZE_URL) FILTER_SANITIZE_URL
)
) )
); );

Loading…
Cancel
Save