abema_unlock.js 687 B

12345678910111213141516171819202122
  1. const url = $request.url;
  2. const body = url.endsWith('region') || url.endsWith('region/')
  3. ? 'OK'
  4. : $response.body
  5. if ($request.method === 'OPTION') {
  6. $done({})
  7. } else {
  8. $done({
  9. status: 200,
  10. body,
  11. headers: {
  12. 'Content-Type': 'text/plain; charset=utf-8',
  13. 'Access-Control-Allow-Origin': '*',
  14. 'Access-Control-Allow-Credentials': '*',
  15. 'Access-Control-Allow-Headers': 'origin,range,hdntl,hdnts',
  16. 'Access-Control-Allow-Methods': 'GET,HEAD,POST,PUT,DELETE,OPTIONS',
  17. 'Access-Control-Expose-Headers': 'Server,range,hdntl,hdnts,Akamai-Mon-Iucid-Ing,Akamai-Mon-Iucid-Del,Akamai-Request-BC',
  18. 'Access-Control-Max-Age': '86400'
  19. }
  20. })
  21. }