mirror of
https://github.com/mashirozx/sakura.git
synced 2024-12-12 09:54:35 +08:00
给每个图片单独设置 referrerPolicy
page-bangumi.php中设置了全局referrer规则:不发送referer。如果开启了PJAX局部刷新,从追番页面去到其它页面该规则也会被保留,这会导致后面的请求也不发送referer。如果有资源比如CDN禁止空referer请求,那么这部分资源就会无法访问。
This commit is contained in:
parent
0128ba483b
commit
74d7f2adbe
@ -50,7 +50,7 @@ class Bilibili
|
||||
}
|
||||
$html .= '<div class="column">
|
||||
<a class="bangumi-item" href="https://bangumi.bilibili.com/anime/' . $list['season_id'] . '/" target="_blank" rel="nofollow">
|
||||
<img class="bangumi-image" src="' . str_replace('http://', 'https://', $list['cover']) . '"/>
|
||||
<img class="bangumi-image" referrerPolicy="no-referrer" src="' . str_replace('http://', 'https://', $list['cover']) . '"/>
|
||||
<div class="bangumi-info">
|
||||
<h3 class="bangumi-title" title="' . $list['title'] . '">' . $list['title'] . '</h2>
|
||||
<div class="bangumi-summary"> ' . $list['evaluate'] . ' </div>
|
||||
|
@ -3,9 +3,8 @@
|
||||
/**
|
||||
Template Name: Bangumi
|
||||
*/
|
||||
get_header();
|
||||
get_header();
|
||||
?>
|
||||
<meta name="referrer" content="same-origin">
|
||||
<style>
|
||||
#content,.comments,.site-footer{max-width:1200px;}
|
||||
.comments{display: none}
|
||||
@ -23,7 +22,7 @@ get_header();
|
||||
<div class="row">
|
||||
<?php
|
||||
$bgm = new \Sakura\API\Bilibili();
|
||||
echo $bgm->get_bgm_items();
|
||||
echo $bgm->get_bgm_items();
|
||||
?>
|
||||
<?php else: ?>
|
||||
<div class="row">
|
||||
|
Loading…
Reference in New Issue
Block a user