implemented a lot of security measures

This commit is contained in:
Codex Agent
2025-12-09 20:29:32 +01:00
parent 4bdb93c171
commit 928d28fcaf
21 changed files with 953 additions and 134 deletions

View File

@@ -58,7 +58,19 @@ class BlogPost extends Model
public function bannerUrl(): Attribute
{
return Attribute::get(fn () => $this->banner ? asset(Storage::url($this->banner)) : '');
return Attribute::get(function () {
if (! $this->banner) {
return '';
}
$path = ltrim($this->banner, '/');
return \URL::temporarySignedRoute(
'api.v1.branding.asset',
now()->addMinutes(30),
['path' => $path]
);
});
}
public function contentHtml(): Attribute