Blob


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