diff --git a/examples/cookie/index.step b/examples/cookie/index.step new file mode 100644 index 0000000..95402b8 --- /dev/null +++ b/examples/cookie/index.step @@ -0,0 +1,10 @@ + + +
+ + + {{$counter := getCookie .Data.Req "counter" | atoi | add 1}} + {{toString $counter | setCookie .Data.Res "counter"}} +You have refreshed this page {{$counter}} time{{if gt $counter 1}}s{{end}}.
+ + diff --git a/examples/cookie/step.meta b/examples/cookie/step.meta new file mode 100644 index 0000000..54d537a --- /dev/null +++ b/examples/cookie/step.meta @@ -0,0 +1,3 @@ +# allows other devices on your local network to use cookies even if you aren't +# using https, etc. +http.insecure-cookie: true