33 lines
962 B
Markdown
33 lines
962 B
Markdown
to play with cookies
|
|
|
|
this serves a nginx server on port 8443
|
|
|
|
> [!CAUTION]
|
|
> you want to change your `/etc/hosts` (on \*nix)
|
|
|
|
```
|
|
# /etc/hosts
|
|
127.0.0.1 website.com a.website.com b.website.com sub.a.website.com
|
|
```
|
|
|
|
to add attributes, modify the file `cookieattr`
|
|
```
|
|
# cookieattr
|
|
set $cookie_attr 'Secure; Domain=a.host.com; HttpOnly;';
|
|
```
|
|
note that the `;` at the end is the line terminator for nginx config and is necessary
|
|
|
|
next, install `just` for your system. take a look at <https://just.systems> if unsure how
|
|
|
|
get `podman` too while you're at it. you don't have `openssl`? what insane operating system are you on? get openssl too.
|
|
|
|
```console
|
|
$ just genssl
|
|
$ just container
|
|
$ # now you mess around with conf.d/server.conf
|
|
$ # you look at https://a.website.com https://b.website.com https://sub.a.website.com
|
|
$ # you can tell you need to tell your browser you want a taste of danger
|
|
$ just reload
|
|
$ # ^ do that when you make changes to server.conf
|
|
```
|