feat(sitemap): refactor sitemap generation to include doctors, clinics, and blogs with improved URL handling
This commit is contained in:
@@ -9,10 +9,12 @@ function cookieDomain(host) {
|
||||
return "." + hostname.split(".").slice(-2).join(".");
|
||||
}
|
||||
|
||||
const isSecure = process.env.NODE_ENV === "production";
|
||||
|
||||
export function setRefreshCookie(response, refreshToken, host, maxAge = 60 * 60 * 24 * 30) {
|
||||
response.cookies.set(COOKIE_NAME, refreshToken, {
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
secure: isSecure,
|
||||
sameSite: "lax",
|
||||
path: "/",
|
||||
maxAge,
|
||||
@@ -23,7 +25,7 @@ export function setRefreshCookie(response, refreshToken, host, maxAge = 60 * 60
|
||||
export function clearRefreshCookie(response, host) {
|
||||
response.cookies.set(COOKIE_NAME, "", {
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
secure: isSecure,
|
||||
sameSite: "lax",
|
||||
path: "/",
|
||||
maxAge: 0,
|
||||
|
||||
Reference in New Issue
Block a user