aboutsummaryrefslogtreecommitdiff
path: root/preprocessor/main.sh
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-11-07 17:32:02 +0000
committerMinteck <nekostarfan@gmail.com>2021-11-07 17:32:02 +0000
commitb304eeffd5a63e9e9dda54ea30a078cf0983f0bb (patch)
tree40f7e2c4d4830bd35e90fc85469dc3e1ba4f49a5 /preprocessor/main.sh
parent8e4003e6b260d75859b1929c8c4264c2239bd074 (diff)
downloadbashweb-b304eeffd5a63e9e9dda54ea30a078cf0983f0bb.tar.gz
bashweb-b304eeffd5a63e9e9dda54ea30a078cf0983f0bb.tar.bz2
bashweb-b304eeffd5a63e9e9dda54ea30a078cf0983f0bb.zip
FIXME - Attempt to create preprocessor
Diffstat (limited to 'preprocessor/main.sh')
-rwxr-xr-xpreprocessor/main.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/preprocessor/main.sh b/preprocessor/main.sh
new file mode 100755
index 0000000..0fdfbc5
--- /dev/null
+++ b/preprocessor/main.sh
@@ -0,0 +1,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