From 10a7a5bedec11d8a5d61f1450d69b52579520267 Mon Sep 17 00:00:00 2001 From: Vamshi Surabhi Date: Mon, 6 Aug 2018 18:28:39 +0530 Subject: [PATCH 1/3] ignore more headers from the request when calling the webhook --- server/src-lib/Hasura/Server/Auth.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src-lib/Hasura/Server/Auth.hs b/server/src-lib/Hasura/Server/Auth.hs index 2474d37decca8..d12e64445b84e 100644 --- a/server/src-lib/Hasura/Server/Auth.hs +++ b/server/src-lib/Hasura/Server/Auth.hs @@ -112,7 +112,11 @@ userInfoFromWebhook logger manager urlT reqHeaders = do throw500 "Internal Server Error" filteredHeaders = flip filter reqHeaders $ \(n, _) -> - n `notElem` ["Content-Length", "User-Agent", "Host", "Origin", "Referer"] + n `notElem` [ "Content-Length", "Content-MD5", "User-Agent", "Host" + , "Origin", "Referer" , "Accept", "Accept-Encoding" + , "Accept-Language", "Accept-Datetime" + , "Cache-Control", "Connection", "DNT" + ] accessKeyHeader :: T.Text accessKeyHeader = "x-hasura-access-key" From b3621c9d95e2246bc3e8b180d6c3dc14497db9eb Mon Sep 17 00:00:00 2001 From: Shahidh K Muhammed Date: Mon, 6 Aug 2018 18:53:24 +0530 Subject: [PATCH 2/3] fix ciignore --- .circleci/ciignore.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/ciignore.sh b/.circleci/ciignore.sh index 61b313d0c0bb9..daa92d214c769 100755 --- a/.circleci/ciignore.sh +++ b/.circleci/ciignore.sh @@ -28,9 +28,16 @@ if [[ ! -a "$ROOT/.ciignore" ]]; then fi # Check CIRCLE_COMPARE_URL first and if its not set, check for diff with master. + if [[ ! -z "$CIRCLE_COMPARE_URL" ]]; then # CIRCLE_COMPARE_URL is not empty, use it to get the diff - COMMIT_RANGE=$(echo $CIRCLE_COMPARE_URL | sed 's:^.*/compare/::g') + if [[ ! -z "$CIRCLE_PULL_REQUEST" ]]; then + # build is not a pull request + COMMIT_RANGE=$(echo $CIRCLE_COMPARE_URL | sed 's:^.*/commit/::g')~1 + else + # build is a pull request + COMMIT_RANGE=$(echo $CIRCLE_COMPARE_URL | sed 's:^.*/compare/::g') + fi echo "Diff: $COMMIT_RANGE" changes="$(git diff $COMMIT_RANGE --name-only)" else From 43f2abe3d50989a10b96f9d4d68c243808d681ba Mon Sep 17 00:00:00 2001 From: Shahidh K Muhammed Date: Mon, 6 Aug 2018 18:57:42 +0530 Subject: [PATCH 3/3] fix url parsing --- .circleci/ciignore.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/ciignore.sh b/.circleci/ciignore.sh index daa92d214c769..c99de4ce1160d 100755 --- a/.circleci/ciignore.sh +++ b/.circleci/ciignore.sh @@ -31,11 +31,9 @@ fi if [[ ! -z "$CIRCLE_COMPARE_URL" ]]; then # CIRCLE_COMPARE_URL is not empty, use it to get the diff - if [[ ! -z "$CIRCLE_PULL_REQUEST" ]]; then - # build is not a pull request + if [[ $CIRCLE_COMPARE_URL = *"commit"* ]]; then COMMIT_RANGE=$(echo $CIRCLE_COMPARE_URL | sed 's:^.*/commit/::g')~1 else - # build is a pull request COMMIT_RANGE=$(echo $CIRCLE_COMPARE_URL | sed 's:^.*/compare/::g') fi echo "Diff: $COMMIT_RANGE"