feat: add cookie management and HTTP client for user and admin authentication

This commit is contained in:
Ardeman
2025-02-25 08:51:08 +08:00
parent 0c38a775e3
commit c1bacacb49
7 changed files with 120 additions and 13 deletions
+11
View File
@@ -0,0 +1,11 @@
import { USER_COOKIES } from '~/configs/storages'
export const setUserLogoutHeaders = () => {
const responseHeaders = new Headers()
responseHeaders.append(
'Set-Cookie',
`${USER_COOKIES.token}=; Path=/news; Max-Age=0`,
)
return responseHeaders
}