Configuring a 'default_root_object' in CloudFront can help protect data rather than exposing the contents of a distribution. By setting a default root object, any request to a specific resource will have a default object to display. For more information on how to configure a default root object and how it works, see the AWS documentation.
References:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html
In AWS console -
In Terraform -