feat(sitemap): refactor sitemap generation to include doctors, clinics, and blogs with improved URL handling

This commit is contained in:
hamed
2026-06-21 12:52:41 +03:30
parent a8c3a57114
commit cb9d9beaab
6 changed files with 98 additions and 141 deletions
+4 -2
View File
@@ -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,