mirror of
https://gitlab.com/SukkaW/ruleset.skk.moe.git
synced 2025-12-31 17:40:25 +00:00
deploy: f226cc13eb1e626d0218f8fd715b3f40d776e679
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
const url = $request.url;
|
||||
const body = url === '/region'
|
||||
const body = url.endsWith('region') || url.endsWith('region/')
|
||||
? 'OK'
|
||||
: $response.body
|
||||
|
||||
$done({ body })
|
||||
if ($request.method === 'OPTION') {
|
||||
$done({})
|
||||
} else {
|
||||
$done({
|
||||
status: 200,
|
||||
body,
|
||||
headers: {
|
||||
'Content-Type': 'text/plain; charset=utf-8',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Credentials': '*',
|
||||
'Access-Control-Allow-Headers': 'origin,range,hdntl,hdnts',
|
||||
'Access-Control-Allow-Methods': 'GET,HEAD,POST,PUT,DELETE,OPTIONS',
|
||||
'Access-Control-Expose-Headers': 'Server,range,hdntl,hdnts,Akamai-Mon-Iucid-Ing,Akamai-Mon-Iucid-Del,Akamai-Request-BC',
|
||||
'Access-Control-Max-Age': '86400'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user