aboutsummaryrefslogtreecommitdiff
path: root/preprocessor/main.sh
blob: 0fdfbc5ff87caf008319d139be0a85e795847805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
while read stdin
do
    data=$(cat index.bhtml | envsubst)
    echo "HTTP/1.1 200 OK"
    echo "Server: Bashweb"
    echo "Date: $(date)"
    echo "Content-Type: text/html; charset=utf-8"
    echo "Content-Length: ${#data}"
    echo "Connection: keep-alive"
    echo "X-Frame-Options: SAMEORIGIN"
    echo "X-XSS-Protection: 1; mode=block"
    echo "Cache-Control: private, no-cache, no-store, must-revalidate"
    echo "X-Content-Type-Options: nosniff"
    echo "Pragma: no-cache"
    echo "Expires: Sat, 01 Jan 2000 00:00:00 GMT"
    echo "Referrer-Policy: no-referrer-when-downgrade"
    echo ""
    echo $data
done