Skip to content

Commit

Permalink
Merge pull request #191 from nebulade/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 authored Feb 2, 2025
2 parents 6da22eb + 519872d commit cd6ced5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions app/src/config.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module.exports = {
ip: '0.0.0.0',
port: process.env.PORT || 3010,
},
trustProxy: false,
ssl: {
// ssl/README.md
cert: '../ssl/cert.pem',
Expand Down

0 comments on commit cd6ced5

Please sign in to comment.