Incorrect Last-Modified HTTP header for /ipfs/multihash links

For some reason IPFS does not return correct last-modified HTTP header if the file accessed using IPFS hash /ipfs/something, but it does return it if you use ipns or domain with _dnslink
This is seen on ipfs.io docs:

$ curl -I https://docs.ipfs.io/introduction/usage/index.html
ā€¦
last-modified: Mon, 04 Feb 2019 11:03:48 GMT

$ dig txt _dnslink.docs.ipfs.io +short
"dnslink=/ipfs/QmVwAhBZSWCCs1UKMUUzDaT5gZM6bj64rjcn2vyhb2Dbgt"

$ curl -I https://ipfs.io/ipfs/QmVwAhBZSWCCs1UKMUUzDaT5gZM6bj64rjcn2vyhb2Dbgt/index.html
ā€¦
last-modified: Thu, 01 Jan 1970 00:00:01 GMT

Is this a bug or a feature?

1 Like

As I was told on IRC, IPFS sets Last-Modified header for IPNS links to the time when IPNS link is resolved (i.e. domain lookup), not to actual file modification date.