Publish LaySite copyright notice and AGPL license

This commit is contained in:
2026-11-25 22:16:38 +08:00
parent acf59c9dfc
commit 080f146fef
10 changed files with 68 additions and 8 deletions
+10
View File
@@ -7,6 +7,7 @@ namespace App\Controller;
use App\Content\Assets;
use App\Content\CanvasStyle;
use App\Content\Html;
use App\Content\Licenses;
use App\Content\Repository;
use App\Content\View;
use FastRoute\Dispatcher;
@@ -21,6 +22,15 @@ final class SiteController
return $this->page($request, 'home');
}
public function license(Request $request): Response
{
$text = Licenses::projectText();
return new Response($text === null ? 404 : 200, [
'Content-Type' => 'text/plain; charset=utf-8', 'X-Content-Type-Options' => 'nosniff',
], $text ?? 'License not found.');
}
public function page(Request $request, string $slug): Response
{
$repo = new Repository();