numerique-gouv / people

Teams management application
MIT License
9 stars 0 forks source link

🚨(backend) fix warning SSL #258

Open AntoLC opened 2 weeks ago

AntoLC commented 2 weeks ago

Purpose

The logs were showing a warning about the SSL:

This commit fixes the warning by setting the SECURE_HSTS_SECONDS to 31536000 and SECURE_SSL_REDIRECT to True.

security.W004: You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
security.W008: Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.

Demo

image