aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/templates/index.html.template2
-rw-r--r--src/util/config.ts7
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 @@
<p>If you have a coverage token, uploading a report is as easy as adding this line to your CI pipeline:</p>
<div class="code-container-container">
<div class="code-container">
- <span class="shell code">curl --proto '=https' --tlsv1.2 -sSf {{TARGET_URL}}/sh | sh</span>
+ <span class="shell code">curl {{CURL_HTTPS}}-sSf {{TARGET_URL}}/sh | sh</span>
</div>
</div>
<p>Visit <a href="https://git.submelon.dev/kjhoerr/ao-coverage/wiki/Home" target="_blank">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;