Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Album Art server serves invalid cache-control header #2132

Open
gmerrall opened this issue Aug 4, 2021 · 0 comments
Open

Album Art server serves invalid cache-control header #2132

gmerrall opened this issue Aug 4, 2021 · 0 comments

Comments

@gmerrall
Copy link

gmerrall commented Aug 4, 2021

Volumio version: 2.907
Browser: Chrome 94 (Mac)

I've observed that the cache-control header returned from /albumart is invalid

i.e.
GET http://192.168.X.X/albumart?cacheid=277&path=%2FMusic%2FBjork%2F2005%20-%20Drawing%20Restraint%209&icon=folder-o&metadata=false

HTTP/1.1 200 OK
Content-Type: image/jpeg
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization, Content-Length, X-Requested-With
Cache-Control: public, max-age=undefined
Date: Wed, 04 Aug 2021 06:53:02 GMT
Content-Length: 86212
Connection: keep-alive
ETag: W/"150c4-17b0fefd8b0"
Accept-Ranges: bytes
Last-Modified: Wed, 04 Aug 2021 06:53:02 GMT
X-Powered-By: Express

I'm actually not sure how browsers respond to invalid cache-control headers but I assume it takes some default which doesn't appear to be "no-store".

This looks to be a scope issue as maxage is defined at the top but not making it into the promise for some reason
https://github.com/volumio/Volumio2/blob/master/app/plugins/miscellanea/albumart/albumart.js#L418

Also I think the maxage is way too long. Can I suggest 86400 (24h)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant