feat: add getBaseUrl function for consistent base URL generation across routes
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m28s
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m28s
feat(calendar): display local timezone in calendar view feat(i18n): add timezone label to German and English translations
This commit is contained in:
@@ -14,6 +14,7 @@ import { Router, text } from 'express';
|
||||
import crypto from 'crypto';
|
||||
import { getDb } from '../config/database.js';
|
||||
import { log } from '../config/logger.js';
|
||||
import { getBaseUrl } from '../middleware/auth.js';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -239,12 +240,8 @@ function validateCalDAVUser(req, res, next) {
|
||||
next();
|
||||
}
|
||||
|
||||
// ── Base URL helper ────────────────────────────────────────────────────────
|
||||
function baseUrl(req) {
|
||||
const proto = req.get('x-forwarded-proto') || req.protocol;
|
||||
const host = req.get('x-forwarded-host') || req.get('host');
|
||||
return `${proto}://${host}`;
|
||||
}
|
||||
// ── Base URL helper (uses shared getBaseUrl from auth.js) ──────────────────
|
||||
const baseUrl = getBaseUrl;
|
||||
|
||||
// ── PROPFIND response builders ─────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user