Re: [relayd] set response header for tagged connexion

2018-10-17 Thread Thuban
* tomr  le [17-10-2018 15:37:42 +1100]:
> 
> 
> On 10/17/18 4:14 AM, Thuban wrote:
> > Hi,
> > I want to set a header according to the requested path. The goal is to 
> > increase
> > the cache-control according to file extension.
> > 
> > For now, I have in relayd.conf something like : 
> > 
> > match request path "/*.css" tag "CSS"
> > match tagged "CSS" response header set "Cache-Control" value 
> > "max-age=1814400"
> 
> I think you might want to try moving 'response' left, so the line begins
> 'match response tagged '
> 
> t
> 

That's it, thanks.

Now I have this configuration, if anyone is interested to increase cache on his
website : 

match request path "/*.html" tag "HTML"
match request path "/*.css" tag "CACHE"
match request path "/*.js" tag "CACHE"
match request path "/*.atom" tag "CACHE"
match request path "/*.rss" tag "CACHE"
match request path "/*.jpg" tag "CACHE"
match request path "/*.png" tag "CACHE"
match request path "/*.svg" tag "CACHE"
match request path "/*.gif" tag "CACHE"
match request path "/*.ico" tag "CACHE"

match response tagged "CACHE" header set "Cache-Control" value 
"max-age=1814400"

match response tagged "HTML" header set "Content-Type" value 
"text/html; charset=UTF-8"


-- 
thuban



Re: [relayd] set response header for tagged connexion

2018-10-16 Thread tomr



On 10/17/18 4:14 AM, Thuban wrote:
> Hi,
> I want to set a header according to the requested path. The goal is to 
> increase
> the cache-control according to file extension.
> 
> For now, I have in relayd.conf something like : 
> 
> match request path "/*.css" tag "CSS"
> match tagged "CSS" response header set "Cache-Control" value "max-age=1814400"

I think you might want to try moving 'response' left, so the line begins
'match response tagged '

t

> Of course, there is a syntax error.
> 
> Any advice ?
> 
> 



[relayd] set response header for tagged connexion

2018-10-16 Thread Thuban
Hi,
I want to set a header according to the requested path. The goal is to increase
the cache-control according to file extension.

For now, I have in relayd.conf something like : 

match request path "/*.css" tag "CSS"
match tagged "CSS" response header set "Cache-Control" value "max-age=1814400"

Of course, there is a syntax error.

Any advice ?


-- 
thuban