mirror of
https://github.com/sigmasternchen/shochu
synced 2025-03-15 15:48:56 +00:00
13 lines
232 B
Bash
13 lines
232 B
Bash
#!/bin/bash
|
|
|
|
getCookie() {
|
|
key="$1"
|
|
echo "$HTTP_COOKIE" | tr ';' $'\n' | grep -e "^$1=" | cut -d= -f2 | sed -r 's/\s*$//g'
|
|
}
|
|
|
|
setCookie() {
|
|
key="$1"
|
|
value="$2"
|
|
attributes="$3"
|
|
header "Set-Cookie" "$key=$value; $attributes"
|
|
}
|