mirror of
https://github.com/YGGverse/Pulsar.git
synced 2025-03-13 05:41:21 +00:00
simplify construction
This commit is contained in:
parent
d0a539db91
commit
30bf68267e
@ -114,15 +114,15 @@ $server->setHandler(
|
||||
// Filter path request
|
||||
$path = preg_replace(
|
||||
[
|
||||
'/\\\/', // unify separators
|
||||
'/(^|\/)[\.]+/', // hidden items started with dot
|
||||
'/[\.]+\//', // relative directory paths
|
||||
'/[\/]+\//', // remove extra slashes
|
||||
],
|
||||
DIRECTORY_SEPARATOR,
|
||||
trim(
|
||||
str_replace(
|
||||
'\\', '/', filter_var($request->getPath(), FILTER_SANITIZE_URL)
|
||||
)
|
||||
filter_var(
|
||||
$request->getPath(),
|
||||
FILTER_SANITIZE_URL
|
||||
)
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user