Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub vcl_fetch {
- # Ticket #786 ESI includes don't follow 301 and 302 redirects
- if ( req.http.x-orig-cc ) {
- set beresp.http.cache-control = req.http.x-orig-cc ", " beresp.http.cache-control;
- }
- if (beresp.status == 307){
- set req.http.x-orig-url = req.url;
- set req.http.x-orig-cc = beresp.http.cache-control;
- set req.url = beresp.http.location;
- restart;
- }
- }
- # Ticket #786 ESI includes don't follow 301 and 302 redirects
- sub vcl_hash {
- if (req.restarts > 0 && req.http.x-orig-url) {
- set req.hash += req.http.x-orig-url;
- } else {
- set req.hash += req.url;
- }
- # fra default:
- if (req.http.host) {
- set req.hash += req.http.host;
- } else {
- set req.hash += server.ip;
- }
- return(hash);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement