Skip to content

Commit

Permalink
Merge pull request #38 from rcousineau-xandr/content-type-json
Browse files Browse the repository at this point in the history
set content-type on webhook curl request
  • Loading branch information
navicore authored Jul 12, 2023
2 parents 3411fe5 + b08c739 commit d008d66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
FROM ubuntu:22.04

ADD http://stedolan.github.io/jq/download/linux64/jq /usr/local/bin/jq

COPY check /opt/resource/check
COPY in /opt/resource/in
COPY out /opt/resource/out

RUN chmod +x /usr/local/bin/jq /opt/resource/out /opt/resource/in /opt/resource/check && \
RUN chmod +x /opt/resource/out /opt/resource/in /opt/resource/check && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y curl
DEBIAN_FRONTEND=noninteractive apt-get install -y curl jq

2 changes: 1 addition & 1 deletion out
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ redacted_webhook_url=$(echo "${webhook_url}" | sed -e 's#/\([^/\.]\{2\}\)[^/.]\{

url_path="$(echo ${webhook_url} | sed -e "s/https\{0,1\}:\/\/[^\/]*\(\/[^?&#]*\).*/\1/")"

curl ${CURL_OPTION} ${PROXY_OPTIONS} -d "${body}" "${webhook_url}" 2>&1 | sed -e "s#${url_path}#***WEBHOOK URL REDACTED***#g"
curl ${CURL_OPTION} ${PROXY_OPTIONS} -H 'Content-Type: application/json' -d "${body}" "${webhook_url}" 2>&1 | sed -e "s#${url_path}#***WEBHOOK URL REDACTED***#g"

timestamp=$(date +%s)
metadata="$(cat <<EOF
Expand Down

0 comments on commit d008d66

Please sign in to comment.