mirror of
https://github.com/ZSCGR/CloudFlare-ImgBed.git
synced 2026-08-13 04:03:42 +08:00
管理端支持拉黑上传ip;管理端批量操作支持按照用户选择的顺序进行;random接口优化
This commit is contained in:
+2
-2
@@ -148,7 +148,7 @@ export async function onRequestPost(context) { // Contents of context object
|
||||
|
||||
// 清除CDN缓存
|
||||
const cdnUrl = `https://${url.hostname}/file/${fullId}`;
|
||||
await purgeCDNCache(env, cdnUrl);
|
||||
await purgeCDNCache(env, cdnUrl, url);
|
||||
|
||||
|
||||
// ====================================不同渠道上传=======================================
|
||||
@@ -440,7 +440,7 @@ async function getFilePath(env, file_id) {
|
||||
}
|
||||
}
|
||||
|
||||
async function purgeCDNCache(env, cdnUrl) {
|
||||
async function purgeCDNCache(env, cdnUrl, url) {
|
||||
// 清除CDN缓存,包括图片和randomFileList接口的缓存
|
||||
const randomFileListUrl = `https://${url.hostname}/api/randomFileList`;
|
||||
const options = {
|
||||
|
||||
Reference in New Issue
Block a user