Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/Http/Controllers/CDash.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __invoke(Request $request)
/**
* Determines if the file being requested is in the CDash filesystem
*/
public function isValidRequest(): bool
protected function isValidRequest(): bool
{
$valid = false;
$path = $this->getPath();
Expand All @@ -80,7 +80,7 @@ public function isValidRequest(): bool
/**
* Determines if the request is a request for a CDash api endpoint
*/
public function isApiRequest(): bool
protected function isApiRequest(): bool
{
$path = $this->getPath();
return str_starts_with($path, 'api/');
Expand All @@ -89,7 +89,7 @@ public function isApiRequest(): bool
/**
* Processes the CDash file for a given request
*/
public function getRequestContents()
protected function getRequestContents()
{
$file = $this->getAbsolutePath();
chdir($this->disk->path(''));
Expand All @@ -111,7 +111,7 @@ public function getRequestContents()
*
* @return ResponseFactory|JsonResponse|Response|\Symfony\Component\HttpFoundation\Response
*/
public function handleApiRequest()
protected function handleApiRequest()
{
$json = $this->getRequestContents();
$status = http_response_code(); // this should be empty if not previously set
Expand All @@ -136,7 +136,7 @@ public function handleApiRequest()
/**
* Returns the path of the request with consideration given to the root path
*/
public function getPath(): string
protected function getPath(): string
{
if (!$this->path) {
$path = $this->request->path();
Expand All @@ -146,7 +146,7 @@ public function getPath(): string
return $this->path;
}

public function getAbsolutePath(): string
protected function getAbsolutePath(): string
{
$path = $this->getPath();
$file = $this->disk->path($path);
Expand Down
3 changes: 0 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,3 @@
Route::get('/monitor.php', fn () => redirect('/monitor', 301));
});
});

// this *MUST* be the last route in the file
Route::any('{url}', 'CDash')->where('url', '.*');