From 14055ede78a138e6d99dbdb77a0b18fc113d37fb Mon Sep 17 00:00:00 2001 From: spirit Date: Thu, 5 Dec 2019 23:31:33 +0800 Subject: [PATCH] update --- inc/api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/api.php b/inc/api.php index b651fc5..970551e 100644 --- a/inc/api.php +++ b/inc/api.php @@ -440,13 +440,14 @@ function get_qq_avatar(){ $qq_number = openssl_decrypt($encrypted, 'aes-128-cbc', $sakura_privkey, 0); preg_match('/^\d{3,}$/', $qq_number, $matches); $imgurl='https://q2.qlogo.cn/headimg_dl?dst_uin='.$matches[0].'&spec=100'; - if(akina_option('qq_avatar_link')=='type_1'){ + if(akina_option('qq_avatar_link')=='type_2'){ $imgdata = file_get_contents($imgurl); header("Content-type: image/jpeg"); + header("Cache-Control: max-age=86400"); echo $imgdata; }else{ $response = new WP_REST_Response(); - $response->set_status(302); + $response->set_status(301); $response->header('Location', $imgurl); return $response; }