mirror of
https://github.com/YGGverse/Pulsar.git
synced 2026-03-31 17:55:37 +00:00
simplify construction
This commit is contained in:
parent
d0a539db91
commit
30bf68267e
1 changed files with 4 additions and 4 deletions
|
|
@ -114,15 +114,15 @@ $server->setHandler(
|
||||||
// Filter path request
|
// Filter path request
|
||||||
$path = preg_replace(
|
$path = 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,
|
||||||
trim(
|
filter_var(
|
||||||
str_replace(
|
$request->getPath(),
|
||||||
'\\', '/', filter_var($request->getPath(), FILTER_SANITIZE_URL)
|
FILTER_SANITIZE_URL
|
||||||
)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue