mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 22:53:09 +00:00
feat: 尝试支持CF Worker部署
This commit is contained in:
parent
a2befaad75
commit
5125847ec4
20
_routes.json
20
_routes.json
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 2,
|
|
||||||
"buildCommand": "npm install && npm run build",
|
|
||||||
"functions": {
|
|
||||||
"api/index.js": {
|
|
||||||
"runtime": "nodejs18.x"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"routes": [
|
|
||||||
{
|
|
||||||
"pattern": "/(.*)",
|
|
||||||
"script": "api/index.js",
|
|
||||||
"headers": {
|
|
||||||
"Access-Control-Allow-Credentials": "true",
|
|
||||||
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
||||||
"Access-Control-Allow-Headers": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"functions": {
|
|
||||||
"api/index.js": {
|
|
||||||
"included_files": ["index.js"],
|
|
||||||
"runtime": "nodejs18.x"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"redirects": [
|
|
||||||
{
|
|
||||||
"source": "/(.*)",
|
|
||||||
"destination": "/api/index.js",
|
|
||||||
"headers": {
|
|
||||||
"Access-Control-Allow-Credentials": "true",
|
|
||||||
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
||||||
"Access-Control-Allow-Headers": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version"
|
|
||||||
},
|
|
||||||
"status": 200
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
9
wrangler.json
Normal file
9
wrangler.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "NeteaseCloudMusicApiEnhanced",
|
||||||
|
"main": "app.js",
|
||||||
|
"compatibility_date": "2025-08-05",
|
||||||
|
"compatibility_flags": ["nodejs_compat"],
|
||||||
|
"service": {
|
||||||
|
"environment": "production"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user