remove RUNNIN_INDEX because always we have index.html
This commit is contained in:
@@ -23,7 +23,6 @@ use ProcessMaker\Validation\ValidationUploadedFiles;
|
||||
class WebApplication
|
||||
{
|
||||
const RUNNING_DEFAULT = "default.running";
|
||||
const RUNNING_INDEX = "index.running";
|
||||
const RUNNING_WORKFLOW = "workflow.running";
|
||||
const RUNNING_API = "api.running";
|
||||
const RUNNING_OAUTH2 = "api.oauth2";
|
||||
@@ -113,13 +112,7 @@ class WebApplication
|
||||
*/
|
||||
public function route()
|
||||
{
|
||||
if ($this->requestUri === "/") {
|
||||
if (file_exists("index.html")) {
|
||||
return self::RUNNING_INDEX;
|
||||
} else {
|
||||
return self::RUNNING_DEFAULT;
|
||||
}
|
||||
} elseif ($this->requestUri !== "/api/oauth2/token" &&
|
||||
if ($this->requestUri !== "/api/oauth2/token" &&
|
||||
substr($this->requestUri, 1, 3) === "api" &&
|
||||
count(explode("/", $this->requestUri)) >= 4 // url api pattern: /api/1.0/<workspace>/<resource>
|
||||
) {
|
||||
@@ -252,7 +245,7 @@ class WebApplication
|
||||
$serverAddr = $_SERVER ['SERVER_ADDR'];
|
||||
$endTime = microtime(true);
|
||||
$time = $endTime - $startingTime;
|
||||
|
||||
|
||||
Bootstrap::verifyPath(PATH_DATA . 'logs', true);
|
||||
$fpt = fopen(PATH_DATA . 'logs/api.log', 'a');
|
||||
fwrite($fpt, sprintf("%s %7.6f %-15s %-4s %s\n", date('Y-m-d H:i:s'), $time, getenv('REMOTE_ADDR'), $_SERVER ['REQUEST_METHOD'], $_SERVER ['REQUEST_URI']));
|
||||
|
||||
Reference in New Issue
Block a user