News for hackers. Stuff that matters.
Re:Twitter accounts are being hijacked for spam by edent on Sunday May 26, 2019 @10:47AM (#20015160)
My server is designed to serve webp only to devices which accept them. So Safari should show jpg / png.

Obviously, if you load the image directly, it'll still be webp.

Re:Twitter accounts are being hijacked for spam by scrollaway on Sunday May 26, 2019 @10:59AM (#20015228)
How do you do it? Looking at the code, it doesn't seem to be based on the Accept headers or on figure/imageset tricks. UA sniffing?
Re:Twitter accounts are being hijacked for spam by edent on Sunday May 26, 2019 @11:03AM (#20015246)
I'm using LiteSpeed Cache Management plugin for WordPress.

It has fiddled my .htaccess to

RewriteCond %{HTTP_ACCEPT} "image/webp" [or] RewriteCond %{HTTP_USER_AGENT} "Page Speed" RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]

But... now I think about it, I probably still have CloudFlare cacheing on. Which means that won't get hit some of the time. Hmmmm.... Let's see if my server can survive HN without a CDN.

Re:Twitter accounts are being hijacked for spam by nitrogen on Sunday May 26, 2019 @12:23PM (#20015696)
You should be able to send a Vary: Accept header to the cache to have it cache all image types.
Re:Twitter accounts are being hijacked for spam by judge2020 on Sunday May 26, 2019 @02:49PM (#20016670)