Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yamadapc/4d6a4f7d7ed74a3116d953dec340b359 to your computer and use it in GitHub Desktop.
Save yamadapc/4d6a4f7d7ed74a3116d953dec340b359 to your computer and use it in GitHub Desktop.
From 78c38a6e80c2d019b9d138b85f19897f80605ac2 Mon Sep 17 00:00:00 2001
From: yamadapc <tacla.yamada@gmail.com>
Date: Wed, 27 Jul 2016 18:36:13 -0300
Subject: [PATCH] Patch yesod templates to not require CSRF
---
yesod-minimal.hsfiles | 2 --
yesod-mongo.hsfiles | 2 --
yesod-mysql.hsfiles | 2 --
yesod-postgres-fay.hsfiles | 2 --
yesod-postgres.hsfiles | 2 --
5 files changed, 10 deletions(-)
diff --git a/yesod-minimal.hsfiles b/yesod-minimal.hsfiles
index d7530cc..5409506 100644
--- a/yesod-minimal.hsfiles
+++ b/yesod-minimal.hsfiles
@@ -166,7 +166,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody encoded
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 200
@@ -183,7 +182,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody $ encode body
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 400
diff --git a/yesod-mongo.hsfiles b/yesod-mongo.hsfiles
index c999fcd..ffb4e42 100644
--- a/yesod-mongo.hsfiles
+++ b/yesod-mongo.hsfiles
@@ -9257,7 +9257,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody encoded
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 200
@@ -9274,7 +9273,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody $ encode body
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 400
diff --git a/yesod-mysql.hsfiles b/yesod-mysql.hsfiles
index 4d175fe..fbb8a24 100644
--- a/yesod-mysql.hsfiles
+++ b/yesod-mysql.hsfiles
@@ -9289,7 +9289,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody encoded
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 200
@@ -9306,7 +9305,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody $ encode body
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 400
diff --git a/yesod-postgres-fay.hsfiles b/yesod-postgres-fay.hsfiles
index eaefa94..3138ac5 100644
--- a/yesod-postgres-fay.hsfiles
+++ b/yesod-postgres-fay.hsfiles
@@ -9395,7 +9395,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody encoded
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 200
@@ -9412,7 +9411,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody $ encode body
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 400
diff --git a/yesod-postgres.hsfiles b/yesod-postgres.hsfiles
index e8fbb20..036fbc2 100644
--- a/yesod-postgres.hsfiles
+++ b/yesod-postgres.hsfiles
@@ -9277,7 +9277,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody encoded
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 200
@@ -9294,7 +9293,6 @@ spec = withApp $ do
setUrl CommentR
setRequestBody $ encode body
addRequestHeader ("Content-Type", "application/json")
- addTokenFromCookie
statusIs 400
--
2.9.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment