forked from STI/Astroport.ONE
Add HTTP/1.1 HEADER BEFORE SENDING HTML
This commit is contained in:
parent
2e0e8af73d
commit
b4d8202f1b
5
12345.sh
5
12345.sh
|
@ -35,7 +35,10 @@ HOMEPAGE="$HOME/.zen/Astroport.ONE/templates/instascan.html"
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
if [[ $HOMEPAGE ]]; then
|
if [[ $HOMEPAGE ]]; then
|
||||||
cp $HOMEPAGE $HOME/.zen/tmp/myIP.http.${MOATS}
|
echo "HTTP/1.1 200 Everything Is Just Fine
|
||||||
|
Server: Astroport
|
||||||
|
Content-Type: text/html; charset=UTF-8" > $HOME/.zen/tmp/myIP.http.${MOATS}
|
||||||
|
cat $HOMEPAGE $HOME/.zen/tmp/myIP.http.${MOATS} >> $HOME/.zen/tmp/myIP.http.${MOATS}
|
||||||
else
|
else
|
||||||
# REPLACE myIP in http response template
|
# REPLACE myIP in http response template
|
||||||
sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS}
|
sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
HTTP/1.1 200 Everything Is Just Fine
|
HTTP/1.1 200 Everything Is Just Fine
|
||||||
Server: Astroport
|
Server: Astroport
|
||||||
Content-Type: text/html; charset=UTF-8
|
Content-Type: text/html; charset=UTF-8
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
Loading…
Reference in New Issue