From 67c22d10e4583e29d33933e4b1b88f9d02f3da47 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 17 Sep 2021 21:44:24 +0000 Subject: Optify SSL info for script on index.html --- public/templates/index.html.template | 2 +- src/util/config.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/templates/index.html.template b/public/templates/index.html.template index 2494e59..f800a29 100644 --- a/public/templates/index.html.template +++ b/public/templates/index.html.template @@ -24,7 +24,7 @@

If you have a coverage token, uploading a report is as easy as adding this line to your CI pipeline:

- curl --proto '=https' --tlsv1.2 -sSf {{TARGET_URL}}/sh | sh + curl {{CURL_HTTPS}}-sSf {{TARGET_URL}}/sh | sh

Visit the AO Coverage diff --git a/src/util/config.ts b/src/util/config.ts index 3692d8a..3b09590 100644 --- a/src/util/config.ts +++ b/src/util/config.ts @@ -72,7 +72,12 @@ export const handleStartup = async ( await persistTemplate({ inputFile: path.join(publicDir, "templates", "index.html.template"), outputFile: path.join(hostDir, "index.html"), - context: { TARGET_URL: targetUrl } + context: { + TARGET_URL: targetUrl, + CURL_HTTPS: targetUrl.includes("https") + ? "--proto '=https' --tlsv1.2 " + : "" + } } as Template); return mongo; -- cgit