authorization enforced on webpages

This commit is contained in:
2025-12-30 18:08:22 -07:00
parent c01d700482
commit 240d82344c
24 changed files with 509 additions and 123 deletions
+6 -2
View File
@@ -24,9 +24,9 @@ func Cookie(c http.Cookie) Response {
func (c cookieRes) String() string {
if c.res != nil {
return fmt.Sprintf(`{"cookie": %q, "nested": %s}`, c.cookie, c.res)
return fmt.Sprintf(`{"cookie": %q, "nested": %s}`, &c.cookie, c.res)
}
return fmt.Sprintf(`{"cookie": %q}`, c.cookie)
return fmt.Sprintf(`{"cookie": %q}`, &c.cookie)
}
func (c cookieRes) wrap(res Response) Response {
@@ -46,6 +46,10 @@ func (c cookieRes) JSON(body any) Response {
return JSON(body).wrap(c)
}
func (c cookieRes) Body(body io.ReadCloser) Response {
return Body(body).wrap(c)
}
func (c cookieRes) Cookie(ck http.Cookie) Response {
return Cookie(ck).wrap(c)
}