mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
check images and dark mode
This commit is contained in:
1 parent
978ebfa75f
commit
904cdd0413
10 files changed
+122
-19
No files matched your search
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
interface Env {
|
||||
YOMITAN_STORAGE_API_TOKEN: string;
|
||||
}
|
||||
@@ -13,6 +13,12 @@
|
||||
|
||||
export default {
|
||||
async fetch(request, env) {
|
||||
// Auth check first
|
||||
const auth = request.headers.get("Authorization");
|
||||
if (auth !== `Bearer ${env.YOMITAN_STORAGE_API_TOKEN}`) {
|
||||
return new Response("Unauthorized", { status: 401 });
|
||||
}
|
||||
|
||||
const url = new URL(request.url);
|
||||
|
||||
// List files: GET /files
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
"skipLibCheck": true,
|
||||
"types": [
|
||||
"./worker-configuration.d.ts",
|
||||
"./env.d.ts",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user