fix: pass CONFIG_KV binding to handlePut, add custom domain config
This commit is contained in:
parent
4c6271a21a
commit
7ea436be34
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.wrangler/
|
||||||
@ -158,7 +158,7 @@ export default {
|
|||||||
case "GET":
|
case "GET":
|
||||||
return handleGet(key, auth, env.CONFIG_KV);
|
return handleGet(key, auth, env.CONFIG_KV);
|
||||||
case "PUT":
|
case "PUT":
|
||||||
return handlePut(key, scope, auth, env, request);
|
return handlePut(key, scope, auth, env.CONFIG_KV, request);
|
||||||
case "DELETE":
|
case "DELETE":
|
||||||
return handleDelete(key, scope, auth, env.CONFIG_KV);
|
return handleDelete(key, scope, auth, env.CONFIG_KV);
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -2,6 +2,10 @@ name = "config-service"
|
|||||||
main = "src/index.ts"
|
main = "src/index.ts"
|
||||||
compatibility_date = "2024-12-01"
|
compatibility_date = "2024-12-01"
|
||||||
|
|
||||||
|
routes = [
|
||||||
|
{ pattern = "config.shazhou.work", custom_domain = true }
|
||||||
|
]
|
||||||
|
|
||||||
[[kv_namespaces]]
|
[[kv_namespaces]]
|
||||||
binding = "CONFIG_KV"
|
binding = "CONFIG_KV"
|
||||||
id = ""
|
id = "1562fdaaafce42e98ee715d0f9e7441a"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user