So a theoretical scenario:
example.com/picture.jpeg
direct link to file
example.com/some-endpoint/picture.jpeg
link to php script which reads in the file and returns it as content.
Is there some serious performance penalties for doing something like this? Why I want to do it like this, I want to do some authentication checks, making sure that for example user is authorized to see the file/mofify headers etc...
So apart from the obvious overhead of running PHP framework to serve the file... would this be significantly slower?
Cause I just can't see why it would be any slower to read file with PHP rather than with Apache.. or am I missing something?