If I run an audit on my sites with Google Chrome, I get this message in the Leverage browser caching section:
The following resources are missing
I just got a similar issue, I discovered the very same setup and code produces a chrome audit warning when trying on my test server at 127.0.0.1, but not on the real server with a real DNS name.