Skip to content

Dev/cmp 5425 - HTTP Strict Transport Security (HSTS) Policy for logi symphony #4000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 53 commits into from

Conversation

davidgemel
Copy link

Adding HTTP Strict Transport Security (HSTS) Policy for logi symphony:

// Middleware to add HSTS headers
this.app.use((req, res, next) => {
const isHttps = req.secure || req.get('X-Forwarded-Proto') === 'https';
if (isHttps) {
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload');
}
next();
});

@davidgemel davidgemel closed this Feb 6, 2025
@automaton82 automaton82 deleted the dev/CMP-5425 branch February 6, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants