Restricting public acces

The way mentioned in the documentation seems to be old as the htacces file is no longer supposed to do this.

https://pimcore.com/docs/6.x/Development_Documentation/Assets/Restricting_Public_Asset_Access.html

how do i do it now?