Search squid archive

cache-control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi squiders,

We want to move the following Go code into squid, as we already have
squid in front of our Go server.

The code is:

func makeResourceHandler() func(http.ResponseWriter, *http.Request) {
  fileServer := http.FileServer(http.Dir("./"))
  return func(w http.ResponseWriter, r *http.Request) {
  w.Header().Add("Cache-Control", string(300))
    fileServer.ServeHTTP(w, r)
  }
}

and in the main() function we have:

http.HandleFunc("/res/", autogzip.HandleFunc(makeResourceHandler()))

The only thing close to this I found was 'header_access Cache-Control
allow all'.

What is the proper way to do this?

Thanks all (for reading) in advance, for any reply.

Any hint/point is appreciate.

Best regards,

-- 
Thiago Farina
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux