mercredi 15 juin 2016, 12:41:30 CEST sri wrote:
> > Would it be possible to tweak the headers for static files? 
> >
> > Adding Expires and Cache-Control headers could be really useful. 
> >
> 
> Sure, if there's a well thought out proposal.
> 

Well, I was thinking about something like that:

$static->headers->{Expires} = 'Fri, 08 Jul 2016 19:54:46 GMT';

Or 

my $headers = Mojo::Headers->new();
$headers->add('Expires' => 'Fri, 08 Jul 2016 19:54:46 GMT');
$static->headers($headers);

I had a look at the code of Mojolicious::Static, it does not seem too
hard to do, I could even try to submit a patch if the idea is OK :-)
-- 
Luc
http://www.fiat-tux.fr/
Internet n'est pas compliqué, Internet est ce que vous en faites.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to