From af60b2f721debfc9addcb971ce2b5379f486c4dc Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 5 Feb 2023 06:53:47 +0400 Subject: [PATCH] Access-Control-Allow-Origin --- main.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.rb b/main.rb index 38d33af..2fb9c4b 100755 --- a/main.rb +++ b/main.rb @@ -17,6 +17,10 @@ $DB_POOL = ConnectionPool.new size: 5, timeout: 5 do end end +before do + headers 'Access-Control-Allow-Origin' => '*' +end + get '/examples' do $DB_POOL.with do |db_conn| ids =