From f2309e973cc57004296da13caa86cfcc02f9cdf9 Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 12 Jul 2025 06:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B8=85=E7=90=86=E7=BC=93?= =?UTF-8?q?=E5=AD=98=20API=20=E7=9A=84=E5=AE=9E=E7=8E=B0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E7=9B=B8=E5=85=B3=E7=9A=84=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/api/{clean-eo-cache.js => eo-cleancache.js} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename functions/api/{clean-eo-cache.js => eo-cleancache.js} (98%) diff --git a/functions/api/clean-eo-cache.js b/functions/api/eo-cleancache.js similarity index 98% rename from functions/api/clean-eo-cache.js rename to functions/api/eo-cleancache.js index a96d40c..50de598 100644 --- a/functions/api/clean-eo-cache.js +++ b/functions/api/eo-cleancache.js @@ -90,7 +90,7 @@ async function qcloudV3Post(secretId, secretKey, service, bodyArray, headersArra } // 处理 OPTIONS 请求 -export function onRequestOptions(context) { +export function onRequestOptions() { return new Response(null, { headers: { 'Access-Control-Allow-Origin': '*', @@ -151,7 +151,7 @@ export async function onRequestPost(context) { } // 处理其他 HTTP 方法 -export function onRequest(context) { +export function onRequest() { return new Response(JSON.stringify({ error: 'Only POST method is allowed' }), { status: 405, headers: {