Blame


1 3304ae77 2024-07-06 continue #!/bin/sh
2 3304ae77 2024-07-06 continue
3 f3ee4dd5 2024-09-11 continue URL=$(cat -)
4 38c6136d 2024-09-11 continue URL_TAIL=$(echo $URL | awk -F "/" '{print $5}')
5 3304ae77 2024-07-06 continue
6 38c6136d 2024-09-11 continue if [ "$URL_TAIL" = auth ]
7 38c6136d 2024-09-11 continue then
8 f3ee4dd5 2024-09-11 continue if [ -z "${VGI_CERT_HASH}" ]; then
9 38c6136d 2024-09-11 continue echo "60 Certificate required"
10 f3ee4dd5 2024-09-11 continue exit
11 f3ee4dd5 2024-09-11 continue fi
12 f3ee4dd5 2024-09-11 continue
13 38c6136d 2024-09-11 continue echo "20 text/gemini"
14 38c6136d 2024-09-11 continue echo "# VGI demo (authenticated)"
15 38c6136d 2024-09-11 continue echo "\`\`\`"
16 38c6136d 2024-09-11 continue echo "VGI_CERT_HASH=$VGI_CERT_HASH"
17 38c6136d 2024-09-11 continue echo "\`\`\`"
18 f3ee4dd5 2024-09-11 continue exit
19 f3ee4dd5 2024-09-11 continue fi
20 f3ee4dd5 2024-09-11 continue
21 38c6136d 2024-09-11 continue echo "20 text/gemini"
22 38c6136d 2024-09-11 continue echo "# VGI demo"
23 38c6136d 2024-09-11 continue echo ""
24 38c6136d 2024-09-11 continue echo "Requested URL:"
25 f3ee4dd5 2024-09-11 continue echo "=> $URL"