Skip to content

Commit

Permalink
管理端支持拉黑上传ip;管理端批量操作支持按照用户选择的顺序进行;random接口优化
Browse files Browse the repository at this point in the history
  • Loading branch information
MarSeventh committed Dec 20, 2024
1 parent 2a75ef9 commit a3e936c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);


// ====================================不同渠道上传=======================================
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit a3e936c

Please sign in to comment.