renamed site directory to server

This commit is contained in:
2026-01-11 15:27:54 -07:00
parent 889aead6b6
commit ae01554b0b
65 changed files with 123 additions and 49 deletions
+17
View File
@@ -0,0 +1,17 @@
package cookies
import (
"net/http"
"time"
)
func AccessToken(tkn string, expiration time.Time) http.Cookie {
return http.Cookie{
Name: "access_token",
Value: tkn,
Path: "/",
Expires: expiration,
MaxAge: 0, // using Expiration instead
Secure: true,
}
}
+11
View File
@@ -0,0 +1,11 @@
package cookies
import "net/http"
func Expired(name string) http.Cookie {
return http.Cookie{
Name: name,
Path: "/",
MaxAge: -1, // expire the cookie
}
}