From ee16f5deb17ec698fd1572988e266ce419a9ebcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 2 Jan 2020 18:21:07 +0100 Subject: [PATCH] Add new headers Add Range to allow headers, Content-Range to expose headers and the Accept-Ranges header --- liquor-cabinet.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/liquor-cabinet.rb b/liquor-cabinet.rb index 6f6324f..8746a42 100644 --- a/liquor-cabinet.rb +++ b/liquor-cabinet.rb @@ -68,8 +68,9 @@ class LiquorCabinet < Sinatra::Base before path do headers 'Access-Control-Allow-Origin' => '*', 'Access-Control-Allow-Methods' => 'GET, PUT, DELETE', - 'Access-Control-Allow-Headers' => 'Authorization, Content-Type, Origin, If-Match, If-None-Match', - 'Access-Control-Expose-Headers' => 'ETag, Content-Length' + 'Access-Control-Allow-Headers' => 'Authorization, Content-Type, Origin, If-Match, If-None-Match, Range', + 'Access-Control-Expose-Headers' => 'ETag, Content-Length, Content-Range', + 'Accept-Ranges' => 'bytes' headers['Access-Control-Allow-Origin'] = env["HTTP_ORIGIN"] if env["HTTP_ORIGIN"] headers['Cache-Control'] = 'no-cache'