Merge branch 'feature/article' into develop
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();
|
||||
|
||||
@@ -78,7 +78,8 @@ class ArticleService extends BaseService
|
||||
|
||||
// 将OSS直连地址替换为代理地址
|
||||
$ossDomain = 'https://vehicle-album.oss-cn-beijing.aliyuncs.com/';
|
||||
$proxyPath = '/console/upload/image/proxy?file=';
|
||||
$proxyPath = $params['domain'].'/console/upload/image/proxy?file=';
|
||||
unset($params['domain']);
|
||||
|
||||
$params['content'] = str_replace(
|
||||
'?Expires=',
|
||||
|
||||
Reference in New Issue
Block a user