This commit is contained in:
2025-06-30 16:02:19 +08:00
parent edbe5ef579
commit 26e2f9ab63
2 changed files with 22 additions and 0 deletions
@@ -123,6 +123,12 @@ class ArticleController extends BaseController
public function edit(Request $request, int $id): Response
{
$request->setPost('user_id', $request->user['id']);
$protocol = $request->header('x-forwarded-proto',
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http');
$domain = $protocol . '://' . $request->host();
$request->setPost('domain', $domain);
try {
return $this->getService()->edit($request->all(), $id)
? $this->successResponse()