mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 14:43:10 +00:00
chore: 尝试适配更多平台的部署
This commit is contained in:
parent
c6bc299bbc
commit
771777b669
20
_routes.json
Normal file
20
_routes.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
14
edgeone.json
Normal file
14
edgeone.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"functions": [
|
||||
{
|
||||
"path": "/(.*)",
|
||||
"method": ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
|
||||
"handler": "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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
20
netlify.toml.json
Normal file
20
netlify.toml.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user