-- 단순 요청 조건을 벗어나면 브라우저가 본 요청 전에 OPTIONS 를 보낸다
send :: [Method] -> Request -> Either Blocked Response
send allowed req
| simple req = Right (fetch req)
| OPTIONS `elem` allowed = Right (fetch req) -- preflight 통과 후 본 요청
| otherwise = Left PreflightFailed
cloudFrontDefault = [GET, HEAD] -- 캐시 동작에 OPTIONS 를 허용해야 한다