Support trust proxy

Sometimes required to set the correct protocol
 https://expressjs.com/en/4x/api.html#req.protocol
هذا الالتزام موجود في:
Johannes Zellner
2025-02-01 23:11:38 +01:00
ملتزم من قبل Johannes Zellner
الأصل 6da22eb46c
التزام 519872d898
2 ملفات معدلة مع 3 إضافات و0 حذوفات

عرض الملف

@@ -138,6 +138,7 @@ const io = socketIo(server, {
});
const host = config.server.hostUrl || `http://localhost:${config.server.listen.port}`;
const trustProxy = !!config.server.trustProxy;
const jwtCfg = {
JWT_KEY: (config.jwt && config.jwt.key) || 'mirotalksfu_jwt_secret',
@@ -357,6 +358,7 @@ function OIDCAuth(req, res, next) {
function startServer() {
// Start the app
app.set('trust proxy', trustProxy);
app.use(helmet.xssFilter()); // Enable XSS protection
app.use(helmet.noSniff()); // Enable content type sniffing prevention
app.use(express.static(dir.public));