Skip to content

Commit

Permalink
update readme (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
toyamarinyon authored Jun 30, 2022
1 parent d788375 commit 508fbfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-countries-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webcrypt-session": patch
---

update readme
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# WebCrypt Session

demo: https://webcrypt-session.sat0shi.workers.dev/

_🛠 Stateless session utility using signed and encrypted cookies to store data. Works with WebCrypt API on Cloudflare Workers._

```ts
Expand All @@ -16,10 +18,13 @@ export default {
request,
{
password: "IF4B#t69!WlX$uS22blaxDvzJJ%$vEh%",
cookie: "session",
}
);
return webCryptSession.response(`Hello ${webCryptSession.session.username}`)
return new Response(`Hello ${webCryptSession.username}`, {
headers: {
"Set-Cookie": webCryptSession.toHeaderValue(),
},
});
},
};
```
Expand Down

0 comments on commit 508fbfb

Please sign in to comment.