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;
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
add a comment |
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
add a comment |
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
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
debian varnish
edited Feb 8 '13 at 9:08
Kenny
asked Feb 5 '13 at 10:15
KennyKenny
13314
13314
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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 pipe
ing, 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.
Added myvcl_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 thereq
in yourvcl_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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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 pipe
ing, 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.
Added myvcl_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 thereq
in yourvcl_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
add a comment |
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 pipe
ing, 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.
Added myvcl_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 thereq
in yourvcl_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
add a comment |
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 pipe
ing, 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.
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 pipe
ing, 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.
answered Feb 7 '13 at 15:50
BMDanBMDan
5,76421531
5,76421531
Added myvcl_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 thereq
in yourvcl_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
add a comment |
Added myvcl_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 thereq
in yourvcl_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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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