Skip to content

Commit

Permalink
replace also access_token key in the request body
Browse files Browse the repository at this point in the history
  • Loading branch information
kacurez committed Sep 6, 2024
1 parent a0873dd commit 613d879
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/keboola/http/recording.clj
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,16 @@


(defn replace-token-by-regexp [item]
(if (string? item)
(cond
(string? item)
(clojure.string/replace item #"access_token=[^&]*" "access_token=TOKEN")
item))

(map? item)
(if (contains? item :access_token)
(assoc item :access_token "TOKEN")
item)

:else item))

(defn record-request [response method url request-rest]
(when @do-log-responses?
Expand Down

0 comments on commit 613d879

Please sign in to comment.