From dac9f02578441a0f349213dfd062d1cb59f828cf Mon Sep 17 00:00:00 2001 From: "Adam C. Baker" Date: Thu, 2 Oct 2014 17:24:14 -0700 Subject: [PATCH] allow options, capital Authorization. --- src/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 2638b34dc..300a6b839 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -35,14 +35,14 @@ argParser = AppConfig defaultCorsPolicy :: CorsResourcePolicy defaultCorsPolicy = CorsResourcePolicy Nothing - ["GET", "POST", "PUT", "PATCH", "DELETE"] ["authorization"] Nothing + ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"] ["Authorization"] Nothing (Just $ 60*60*24) False False True corsPolicy :: Request -> Maybe CorsResourcePolicy corsPolicy req = case lookup "origin" headers of Just origin -> Just defaultCorsPolicy { corsOrigins = Just ([origin], True), - corsRequestHeaders = "authentication":accHeaders + corsRequestHeaders = "Authentication":accHeaders } Nothing -> Nothing where