Varnish not showing custom headersVarnish ESI multiple fragments, single request?Configure php5-fpm for many concurrent usersVarnish saintmode gives 503 instead of backend's custom 500 pageReliably test ColdFusion server healthvarnishncsa not logging custom headersvarnish purging showing error 403 Not allowedVarnish cache headers to browserVarnish 5 seconds delayVarnish cache randomly changing response content-lengthvarnish purge causes error 503

What was Bran's plan to kill the Night King?

Is Soreness in Middle Knuckle of Fretting Hand Index Finger Normal for Beginners?

Why do these characters still seem to be the same age after the events of Endgame?

When does tabularx decide to break the cell entry instead of reducing the columns separation?

Change in "can't be countered" wording

Notation: What does the tilde bellow of the Expectation mean?

Python 3 - simple temperature program

Has the United States ever had a non-Christian President?

How can Internet speed be 10 times slower without a router than when using the same connection with a router?

Why do people keep telling me that I am a bad photographer?

What do "Sech" and "Vich" mean in this sentence?

Are the Night's Watch still required?

My first c++ game (snake console game)

Is disk brake effectiveness mitigated by tyres losing traction under strong braking?

Is an HNN extension of a virtually torsion-free group virtually torsion-free?

Are pressure-treated posts that have been submerged for a few days ruined?

Agena docking and RCS Brakes in First Man

As a GM, is it bad form to ask for a moment to think when improvising?

Would you use "llamarse" for an animal's name?

A factorization game

Are there terms in German for different skull shapes?

Find magical solution to magical equation

To kill a cuckoo

Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?



Varnish not showing custom headers


Varnish ESI multiple fragments, single request?Configure php5-fpm for many concurrent usersVarnish saintmode gives 503 instead of backend's custom 500 pageReliably test ColdFusion server healthvarnishncsa not logging custom headersvarnish purging showing error 403 Not allowedVarnish cache headers to browserVarnish 5 seconds delayVarnish cache randomly changing response content-lengthvarnish purge causes error 503






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















In my Varnish 3 configuration (default.vcl) I configured the following to pass along information via the response headers:



sub vcl_deliver 
if (obj.hits > 0)
set resp.http.X-Cache = "HIT";
set resp.http.X-Cache-Hits = obj.hits;
else
set resp.http.X-Cache = "MISS";

set resp.http.X-Cache-Expires = resp.http.Expires;
set resp.http.X-Test = "LOL";

# remove Varnish/proxy header
remove resp.http.X-Varnish;
remove resp.http.Via;
remove resp.http.Age;
remove resp.http.X-Purge-URL;
remove resp.http.X-Purge-Host;
remove resp.http.X-Powered-By;



And yet the only thing I can see is



HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html
Content-Length: 8492
Accept-Ranges: bytes
Date: Tue, 05 Feb 2013 10:11:02 GMT
Connection: keep-alive


It doesn't show any headers that we have added inside the vcl_deliver method.



EDIT: This is my vcl_fetch method:



sub vcl_fetch js)$") 
set beresp.ttl = 7d;
set beresp.grace = 1d;
return(deliver);


# cache everythig else for 1 hours
set beresp.ttl = 1h;

# grace period of 1 day
set beresp.grace = 1d;

return(deliver);



Anyone got an idea how to solve this as NO custom headers are included in the response headers... As you can see above in my vcl_fetch method I add several custom response headers but none of they are showing.










share|improve this question






























    0















    In my Varnish 3 configuration (default.vcl) I configured the following to pass along information via the response headers:



    sub vcl_deliver 
    if (obj.hits > 0)
    set resp.http.X-Cache = "HIT";
    set resp.http.X-Cache-Hits = obj.hits;
    else
    set resp.http.X-Cache = "MISS";

    set resp.http.X-Cache-Expires = resp.http.Expires;
    set resp.http.X-Test = "LOL";

    # remove Varnish/proxy header
    remove resp.http.X-Varnish;
    remove resp.http.Via;
    remove resp.http.Age;
    remove resp.http.X-Purge-URL;
    remove resp.http.X-Purge-Host;
    remove resp.http.X-Powered-By;



    And yet the only thing I can see is



    HTTP/1.1 200 OK
    Vary: Accept-Encoding
    Content-Encoding: gzip
    Content-Type: text/html
    Content-Length: 8492
    Accept-Ranges: bytes
    Date: Tue, 05 Feb 2013 10:11:02 GMT
    Connection: keep-alive


    It doesn't show any headers that we have added inside the vcl_deliver method.



    EDIT: This is my vcl_fetch method:



    sub vcl_fetch js)$") 
    set beresp.ttl = 7d;
    set beresp.grace = 1d;
    return(deliver);


    # cache everythig else for 1 hours
    set beresp.ttl = 1h;

    # grace period of 1 day
    set beresp.grace = 1d;

    return(deliver);



    Anyone got an idea how to solve this as NO custom headers are included in the response headers... As you can see above in my vcl_fetch method I add several custom response headers but none of they are showing.










    share|improve this question


























      0












      0








      0








      In my Varnish 3 configuration (default.vcl) I configured the following to pass along information via the response headers:



      sub vcl_deliver 
      if (obj.hits > 0)
      set resp.http.X-Cache = "HIT";
      set resp.http.X-Cache-Hits = obj.hits;
      else
      set resp.http.X-Cache = "MISS";

      set resp.http.X-Cache-Expires = resp.http.Expires;
      set resp.http.X-Test = "LOL";

      # remove Varnish/proxy header
      remove resp.http.X-Varnish;
      remove resp.http.Via;
      remove resp.http.Age;
      remove resp.http.X-Purge-URL;
      remove resp.http.X-Purge-Host;
      remove resp.http.X-Powered-By;



      And yet the only thing I can see is



      HTTP/1.1 200 OK
      Vary: Accept-Encoding
      Content-Encoding: gzip
      Content-Type: text/html
      Content-Length: 8492
      Accept-Ranges: bytes
      Date: Tue, 05 Feb 2013 10:11:02 GMT
      Connection: keep-alive


      It doesn't show any headers that we have added inside the vcl_deliver method.



      EDIT: This is my vcl_fetch method:



      sub vcl_fetch js)$") 
      set beresp.ttl = 7d;
      set beresp.grace = 1d;
      return(deliver);


      # cache everythig else for 1 hours
      set beresp.ttl = 1h;

      # grace period of 1 day
      set beresp.grace = 1d;

      return(deliver);



      Anyone got an idea how to solve this as NO custom headers are included in the response headers... As you can see above in my vcl_fetch method I add several custom response headers but none of they are showing.










      share|improve this question
















      In my Varnish 3 configuration (default.vcl) I configured the following to pass along information via the response headers:



      sub vcl_deliver 
      if (obj.hits > 0)
      set resp.http.X-Cache = "HIT";
      set resp.http.X-Cache-Hits = obj.hits;
      else
      set resp.http.X-Cache = "MISS";

      set resp.http.X-Cache-Expires = resp.http.Expires;
      set resp.http.X-Test = "LOL";

      # remove Varnish/proxy header
      remove resp.http.X-Varnish;
      remove resp.http.Via;
      remove resp.http.Age;
      remove resp.http.X-Purge-URL;
      remove resp.http.X-Purge-Host;
      remove resp.http.X-Powered-By;



      And yet the only thing I can see is



      HTTP/1.1 200 OK
      Vary: Accept-Encoding
      Content-Encoding: gzip
      Content-Type: text/html
      Content-Length: 8492
      Accept-Ranges: bytes
      Date: Tue, 05 Feb 2013 10:11:02 GMT
      Connection: keep-alive


      It doesn't show any headers that we have added inside the vcl_deliver method.



      EDIT: This is my vcl_fetch method:



      sub vcl_fetch js)$") 
      set beresp.ttl = 7d;
      set beresp.grace = 1d;
      return(deliver);


      # cache everythig else for 1 hours
      set beresp.ttl = 1h;

      # grace period of 1 day
      set beresp.grace = 1d;

      return(deliver);



      Anyone got an idea how to solve this as NO custom headers are included in the response headers... As you can see above in my vcl_fetch method I add several custom response headers but none of they are showing.







      debian varnish






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 8 '13 at 9:08







      Kenny

















      asked Feb 5 '13 at 10:15









      KennyKenny

      13314




      13314




















          1 Answer
          1






          active

          oldest

          votes


















          0














          vcl_deliver is only called for objects found in cache. You probably meant to use vcl_fetch.



          If that's not the issue, you don't show the request you're sending or your vcl_recv. Perhaps you're pipeing, for example? Try sending a raw request via telnet or netcat and show us both what you sent and received. And since you're using vcl_deliver, do the same request twice so we can debug properly, please.






          share|improve this answer























          • Added my vcl_fetch method

            – Kenny
            Feb 8 '13 at 9:00











          • @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

            – BMDan
            Feb 12 '13 at 22:15












          • Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

            – BMDan
            Feb 12 '13 at 22:18











          • It was my browser that was hiding these headers ;)

            – Kenny
            Feb 13 '13 at 10:12











          • @Kenny: Great! Please update your question and close it.

            – BMDan
            Feb 14 '13 at 21:21











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f475541%2fvarnish-not-showing-custom-headers%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          vcl_deliver is only called for objects found in cache. You probably meant to use vcl_fetch.



          If that's not the issue, you don't show the request you're sending or your vcl_recv. Perhaps you're pipeing, for example? Try sending a raw request via telnet or netcat and show us both what you sent and received. And since you're using vcl_deliver, do the same request twice so we can debug properly, please.






          share|improve this answer























          • Added my vcl_fetch method

            – Kenny
            Feb 8 '13 at 9:00











          • @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

            – BMDan
            Feb 12 '13 at 22:15












          • Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

            – BMDan
            Feb 12 '13 at 22:18











          • It was my browser that was hiding these headers ;)

            – Kenny
            Feb 13 '13 at 10:12











          • @Kenny: Great! Please update your question and close it.

            – BMDan
            Feb 14 '13 at 21:21















          0














          vcl_deliver is only called for objects found in cache. You probably meant to use vcl_fetch.



          If that's not the issue, you don't show the request you're sending or your vcl_recv. Perhaps you're pipeing, for example? Try sending a raw request via telnet or netcat and show us both what you sent and received. And since you're using vcl_deliver, do the same request twice so we can debug properly, please.






          share|improve this answer























          • Added my vcl_fetch method

            – Kenny
            Feb 8 '13 at 9:00











          • @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

            – BMDan
            Feb 12 '13 at 22:15












          • Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

            – BMDan
            Feb 12 '13 at 22:18











          • It was my browser that was hiding these headers ;)

            – Kenny
            Feb 13 '13 at 10:12











          • @Kenny: Great! Please update your question and close it.

            – BMDan
            Feb 14 '13 at 21:21













          0












          0








          0







          vcl_deliver is only called for objects found in cache. You probably meant to use vcl_fetch.



          If that's not the issue, you don't show the request you're sending or your vcl_recv. Perhaps you're pipeing, for example? Try sending a raw request via telnet or netcat and show us both what you sent and received. And since you're using vcl_deliver, do the same request twice so we can debug properly, please.






          share|improve this answer













          vcl_deliver is only called for objects found in cache. You probably meant to use vcl_fetch.



          If that's not the issue, you don't show the request you're sending or your vcl_recv. Perhaps you're pipeing, for example? Try sending a raw request via telnet or netcat and show us both what you sent and received. And since you're using vcl_deliver, do the same request twice so we can debug properly, please.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 7 '13 at 15:50









          BMDanBMDan

          5,76421531




          5,76421531












          • Added my vcl_fetch method

            – Kenny
            Feb 8 '13 at 9:00











          • @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

            – BMDan
            Feb 12 '13 at 22:15












          • Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

            – BMDan
            Feb 12 '13 at 22:18











          • It was my browser that was hiding these headers ;)

            – Kenny
            Feb 13 '13 at 10:12











          • @Kenny: Great! Please update your question and close it.

            – BMDan
            Feb 14 '13 at 21:21

















          • Added my vcl_fetch method

            – Kenny
            Feb 8 '13 at 9:00











          • @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

            – BMDan
            Feb 12 '13 at 22:15












          • Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

            – BMDan
            Feb 12 '13 at 22:18











          • It was my browser that was hiding these headers ;)

            – Kenny
            Feb 13 '13 at 10:12











          • @Kenny: Great! Please update your question and close it.

            – BMDan
            Feb 14 '13 at 21:21
















          Added my vcl_fetch method

          – Kenny
          Feb 8 '13 at 9:00





          Added my vcl_fetch method

          – Kenny
          Feb 8 '13 at 9:00













          @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

          – BMDan
          Feb 12 '13 at 22:15






          @Kenny so I take it that your X-Wut header isn't showing up? It might be worthwhile to simply dump your entire VCL in here. In this case, we're looking for mistakes, and requiring you to know where those mistakes are only works if you already know what mistakes you made. For example, you're modifying the req in your vcl_fetch, which isn't going to accomplish very much in almost all cases. This tells me that you probably are building a VCL largely from snippets, which means we need to see the whole kit 'n' caboodle in order to diagnose the cause of the symptoms you're seeing.

          – BMDan
          Feb 12 '13 at 22:15














          Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

          – BMDan
          Feb 12 '13 at 22:18





          Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.

          – BMDan
          Feb 12 '13 at 22:18













          It was my browser that was hiding these headers ;)

          – Kenny
          Feb 13 '13 at 10:12





          It was my browser that was hiding these headers ;)

          – Kenny
          Feb 13 '13 at 10:12













          @Kenny: Great! Please update your question and close it.

          – BMDan
          Feb 14 '13 at 21:21





          @Kenny: Great! Please update your question and close it.

          – BMDan
          Feb 14 '13 at 21:21

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f475541%2fvarnish-not-showing-custom-headers%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

          Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

          What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company