Add two more sgmodule

This commit is contained in:
SukkaW
2022-05-04 15:25:25 +08:00
parent 7aaabd6d99
commit f226cc13eb
6 changed files with 44 additions and 2 deletions

22
Script/abema_unlock.js Normal file
View File

@@ -0,0 +1,22 @@
const url = $request.url;
const body = url.endsWith('region') || url.endsWith('region/')
? 'OK'
: $response.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'
}
})
}