Blob


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