现在,js跳转会被ETAG缓存

This commit is contained in:
2024-11-07 23:29:13 +08:00
parent 6a4bc0814f
commit d2830b6d31
7 changed files with 9 additions and 640 deletions
+7 -1
View File
@@ -103,12 +103,18 @@ class Server
return redirect('/');
}
if($source->type==0){
$etag='"'.md5($source->source).'"';
$if_none_match = $request->header('If-None-Match',null);
if($if_none_match==$etag){
return response('',304);
}
if($source->webid==null){
$ba='block';
}else{
$ba='none';
}
return view('jump', ['source' => $source,'ba'=>$ba]);
return view('jump', ['source' => $source,'ba'=>$ba])->header('ETag', $etag);
}elseif($source->type==1){
return redirect($source->source);
}