1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 03:12:46 +01:00

Do not allow to open app at /public/

This commit is contained in:
FreeScout 2019-07-12 13:49:52 -07:00
parent 99f5f4a2ad
commit 999f2ab3b0
3 changed files with 15 additions and 0 deletions

View File

@ -6,6 +6,11 @@ if (!version_compare(phpversion(), '7.0.0', '>=')) {
exit();
}
if (preg_match("#^/public\/(.*)#", $_SERVER['REQUEST_URI'], $m) && !empty($m[1])) {
header("Location: /".$m[1]);
exit();
}
/*
* Laravel - A PHP Framework For Web Artisans.
*

View File

@ -4,6 +4,11 @@
*/
ini_set('display_errors', 'Off');
if (preg_match("#^/public\/(.*)#", $_SERVER['REQUEST_URI'], $m) && !empty($m[1])) {
header("Location: /".$m[1]);
exit();
}
$root_dir = realpath(__DIR__.'/..').'/';
// Dotenv library for reading .env files

View File

@ -4,6 +4,11 @@
*/
ini_set('display_errors', 'On');
if (preg_match("#^/public\/(.*)#", $_SERVER['REQUEST_URI'], $m) && !empty($m[1])) {
header("Location: /".$m[1]);
exit();
}
$root_dir = realpath(__DIR__.'/..').'/';
// Dotenv library for reading .env files