In my Phoenix app, I want to serve all files under a certain directory EXCEPT those with a certain file extension. So, for example, I want to serve “/uploads/example.jpg” but NOT “/uploads/example.pdf”. How can I accomplish this task?
I am currently solving this in production at the level of my reverse proxy, but I am curious if there is a Phoenix-level method to prevent this. Thanks!