mirror of
https://github.com/ZSCGR/CloudFlare-ImgBed.git
synced 2026-08-19 23:23:44 +08:00
Merge branch 'main' of https://github.com/MarSeventh/CloudFlare-ImgBed
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
import { errorHandling, telemetryData, checkKVConfig } from './utils/middleware';
|
||||
|
||||
export const onRequest = [checkKVConfig, errorHandling, telemetryData];
|
||||
@@ -0,0 +1,3 @@
|
||||
import { checkKVConfig } from '../utils/middleware';
|
||||
|
||||
export const onRequest = [checkKVConfig];
|
||||
@@ -1,11 +1,19 @@
|
||||
import { fetchSecurityConfig } from "../../utils/sysConfig";
|
||||
import { checkKVConfig, errorHandling } from "../../utils/middleware";
|
||||
import { checkKVConfig } from "../../utils/middleware";
|
||||
import { validateApiToken } from "../../utils/tokenValidator";
|
||||
|
||||
let securityConfig = {}
|
||||
let basicUser = ""
|
||||
let basicPass = ""
|
||||
|
||||
async function errorHandling(context) {
|
||||
try {
|
||||
return await context.next();
|
||||
} catch (err) {
|
||||
return new Response(`${err.message}\n${err.stack}`, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
function basicAuthentication(request) {
|
||||
const Authorization = request.headers.get('Authorization');
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import { checkKVConfig } from '../utils/middleware';
|
||||
|
||||
export const onRequest = [checkKVConfig];
|
||||
@@ -0,0 +1,3 @@
|
||||
import { checkKVConfig } from '../utils/middleware';
|
||||
|
||||
export const onRequest = [checkKVConfig];
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fetchOthersConfig } from "./utils/sysConfig";
|
||||
import { readIndex } from "./utils/indexManager";
|
||||
import { fetchOthersConfig } from "../utils/sysConfig";
|
||||
import { readIndex } from "../utils/indexManager";
|
||||
|
||||
let othersConfig = {};
|
||||
let allowRandom = false;
|
||||
@@ -0,0 +1,3 @@
|
||||
import { errorHandling, telemetryData, checkKVConfig } from '../utils/middleware';
|
||||
|
||||
export const onRequest = [checkKVConfig, errorHandling, telemetryData];
|
||||
@@ -1,7 +1,6 @@
|
||||
import sentryPlugin from "@cloudflare/pages-plugin-sentry";
|
||||
import '@sentry/tracing';
|
||||
import { fetchOthersConfig } from "./sysConfig";
|
||||
import { getIndexInfo, rebuildIndex } from "./indexManager";
|
||||
|
||||
let disableTelemetry = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user