1
This commit is contained in:
@@ -108,6 +108,11 @@ class ArticleController extends BaseController
|
||||
{
|
||||
try {
|
||||
$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);
|
||||
return $this->getService()->add($request->all())
|
||||
? $this->successResponse()
|
||||
: $this->errorResponse();
|
||||
|
||||
Reference in New Issue
Block a user