From 61bf9012d686c02a1bc5964a67dbeb2096c05767 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sun, 21 May 2017 20:12:47 -0700 Subject: [PATCH] dont set cookie for api calls --- app.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.rb b/app.rb index 0dc4422a..52accc05 100644 --- a/app.rb +++ b/app.rb @@ -77,6 +77,12 @@ before do end end +after do + if @api + request.session_options[:skip] = true + end +end + #after do #response.headers['Content-Security-Policy'] = %{block-all-mixed-content; default-src 'self'; connect-src 'self' https://api.stripe.com; frame-src https://www.google.com/recaptcha/ https://js.stripe.com; script-src 'self' 'unsafe-inline' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://js.stripe.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: } #end