CSS/JS isn't minified when a proxy has removed the file extension.

This detects minifiable content using its content type instead of file extension.

An exception is made for PHP files since they have no identifying content type. I'm wondering if it would be cleaner to just register one in Rack.
Is there a tidier way to solve this?