2026-09-02 23:24:04 +05:30
2026-09-02 14:20:49 +05:30
2026-09-02 02:37:30 +05:30
2026-09-02 14:20:49 +05:30
2026-09-02 23:24:04 +05:30
2026-09-02 14:36:19 +05:30
2026-09-02 14:20:49 +05:30

what is this?

to play with cookies

this serves a nginx server on port 8443

how to use?

set up dns

Caution

you want to change your /etc/hosts (on *nix; requires root)

# /etc/hosts
127.0.0.1 website.com a.website.com b.website.com sub.a.website.com

the nginx config has these domains hardcoded. change them too if you want

set up tls

run make setup-tls

you don't have make? well install it.

you don't have openssl? what insane operating system are you on? get openssl too.

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

start the server

with compose

$ docker compose up -d
$ docker compose exec cookies nginx -s reload
$ # or create a make/just target to do that

with podman

$ just container
$ # now you mess around with cookieattr
$ # 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 config

what if sth doesn't work?

using podman?

give the nginx (sub)user access to the tls directory

$ podman unshare setfacl -Rmu:101:rX tls/

using docker?

might be the :z label in the volumes in docker-compose.yml. remove it. e.g.

- ./tls:/etc/nginx/tls:ro

using macOS?

make is angry with you? you're on your own for this one. just read the commands and run them directly

S
Description
No description provided
Readme 40 KiB
Languages
HTML 63.4%
Just 21%
Makefile 15.6%