code: def set_hsts_header(self, response):
          
          # Should we add STS header?
          if request.is_secure and not self.skip:
              response.headers.setdefault("Strict-Transport-Security", self.hsts_header)
          return response
docs: Adds HSTS header to each response.