Now we serve cookie

This commit is contained in:
fred 2023-03-22 18:08:38 +01:00
parent e9649fce94
commit d2221566cb
2 changed files with 6 additions and 3 deletions

View File

@ -452,10 +452,12 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
fi
echo ${REP}
REPLACE=${myASTROPORT}/ipns/$(ipfs key list -l | grep $PLAYER | cut -d ' ' -f1)
ASTRONAUTENS=$(ipfs key list -l | grep $PLAYER | cut -d ' ' -f1)
REPLACE=${myASTROPORT}/ipns/${ASTRONAUTENS}
## SET COOKIE
sed "s~_TWLINK_~${REPLACE}~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/coucou/${MOATS}.index.redirect
sed -i "s~_G1PUB_~${G1PUB}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
sed -i "s~_ASTRONAUTENS_~${ASTRONAUTENS}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
echo "url='"${REPLACE}"'" >> ~/.zen/tmp/coucou/${MOATS}.index.redirect
cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &

View File

@ -3,5 +3,6 @@ Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET
Content-Type: text/html; charset=UTF-8
Set-Cookie: sessionId= userId=_G1PUB_ ipnsId=_ASTRONAUTENS_
Location: _TWLINK_