Home > nginx > Disable User-Agent based Vary header response in nginx?

Disable User-Agent based Vary header response in nginx?

October 20Hits:4
Advertisement

It seems that nginx includes a Vary: Accept-Encoding header in some cases regardless of the file types I specify via "gzip_types".

I do not have much experience with nginx. Does it in fact send Vary: Accept-Encoding headers depending on the requesting User-Agent header?

Also, is there a setting (or combination of settings) that can be modified in order to stop nginx from sending Vary: Accept-Encoding headers for specific User-Agents?

There seem to be quite a few settings and I simply do not know which take precedence.

I suppose something like the following would not achieve what I want (I still want the Vary: Accept-Encoding response for file types only):
gzip_disable "*";

Answers

I don't understand why you'd want to change this. Vary: tells any caching proxy that it can not rely purely on the URL to cache the result and that it also needs to take into account of the Accept-Encoding: header too. This is the correct behaviour. You are going to get a different response if your client says it can deal with compressed responses or not. Without this header, a cache may attempt to send a compressed response to a client that can't handle it.

Related Articles

  • Disable User-Agent based Vary header response in nginx?October 20

    It seems that nginx includes a Vary: Accept-Encoding header in some cases regardless of the file types I specify via "gzip_types". I do not have much experience with nginx. Does it in fact send Vary: Accept-Encoding headers depending on the requ

  • How to disable Winamp agent in the taskbar?

    How to disable Winamp agent in the taskbar?April 15

    I remember the days when I could right click on the Winamp icon in the Windows taskbar, and select "Disable Winamp Agent", and it would actually disable and not appear again. This no longer seems to work on Windows 7 (or maybe Windows in general

  • Parameterize Agent Based Simulation (OOP-Question)May 24

    I'd like to hear my fellow programmer's thoughts on the issue of parametrizing agent based simulations: Consider: Simulation core, including geometry, collision tests, some rules Different agents (modelled in OOP-fashion: has-a, is-a, abstract interf

  • How to disable USB devices based on vendor ID in Linux?January 31

    I want to disable USB devices based on vendor ID in Linux, and allow only specific devices to be used. How can I do that? --------------Solutions------------- When you connect a usb device to your PC, a service called udev manages the work of connect

  • how to disable USB devices based on vendor id in Linux environment?January 31

    I want to disable usb devices based on vendor id in Linux environment. I want to allow only specific USB devices, based on vendor id. --------------Solutions------------- You can make a udev rule that disables devices by default, but enables certain

  • Conditional success callback based on Ajax Response not workingFebruary 20

    I am trying to run an ajax request to pass some data to a function I have written. I return the response, and try and run some javascript based on the response, but it doesn't seem to be running properly. Regardless of what the response is back, it a

  • Disable the fields based on the groupsJune 19

    I want to disable the fields based on the user group. Example: 1. Group1 disable Field 1 and Field 2 2. Group2 disable Field 3 and Field 4 3. Group3 disable all the fields. --------------Solutions------------- By default Sharepoint isn't providing co

  • nginx - Change error_page based on proxy_pass responseJune 19

    Is it possible to change the fallback error_page based on the response of the upstream proxy? upstream serverA { server servera.com; } upstream serverB { server serverb.com; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-F

  • Spatial parametric scaling in agent-based modelJanuary 10

    I'm running a simple agent-based disease spread model on a 2D lattice, where disease transmission in a population depends on each individual's chance of avoiding infection at every time step, which decreases with the local density of the infected and

  • PHP How to sort foreach based on XML response?January 31

    I like to sort my XML response. This is my code: // Make some cURL // Create a simple XML element $xml = new SimpleXMLElement($resp, LIBXML_NOWARNING, false); // Output foreach ($xml->Departure as $departure){ // DEFINE VARIABLES BASED ON XML RESPONS

  • Are web browser games like Travian/Tribal Wars based on asynchronous responses? October 12

    I'm coding in Python. Currently, with some group of people, we are making a decision about server-side language choice for our web-browser-based strategy game. I have some questions: Are games like Travian based on asynchronous requests or it's all n

  • Disabling `git commit` based on server timeApril 13

    Is there a way to disable git commit when the server time reaches 11am and re-enable when it reaches 2pm? Or disable git push to all but a select number of users --------------Solutions------------- Wow you are going to rewrite the whole binary!?!? H

  • Should we show/hide/disable functional buttons based on state?

    Should we show/hide/disable functional buttons based on state? August 23

    Possible Duplicate: Should disabled options ever be hidden? I'm currently working with a project team that has a requirement to make additional reports/data available to end-users with a single click from a customer task screen. It has been decided t

  • Disable/Enable columns based upon content of another columnFebruary 1

    In a custom list I have 2 columns. Column A is a drop down selection, lets say the selections are True/False for simplicity. What I want to do is have a second column that is either Enable/Visible or Disabled/Hidden on the form based upon the value o

  • Disabling Java AgentsFebruary 8

    Currently running a server that provides some of the Atlasian tools (Crucible, fisheye, jira), I want, for security reasons to disable ANY Java agents execution on the server. My point is not disabling agents that can be launched with the application

  • Run job in agent based on table dataMarch 6

    Is there a way to start a SQL Server agent job if a table is not empty? Basically, first I want to check a table, and if the table is not empty then start the job. If it is empty, then check every 1 hour to see whether it has the required information

  • how to enable/disable a dropdown based on value in another dropdown in sharepoint 2013October 15

    I want to enable/disable a dropdown field based on the value of other dropdown field in the sharepoint 2013 form.I know that it is possible using jquery but i dont know how to write? help me to get the correct code. --------------Solutions-----------

  • Enable/Disable ribbon button based on current item value of a fieldOctober 17

    Lets say I have a field called locked, which is boolean on a document library. And I want to make a workflow to Lock or Unlock an item. The Lock button should be enable only if its unlocked and the unlock if its locked. The lock button will be a cust

  • Disable the admin bar / probleme with responsive menuMay 26

    I am using a plugin called Disable WP Admin Bar Removal The goal : Disable the admin bar (back and frontend). I really want to disable this bar for the dashboard but if I want to use the dashboard on my phone or tablet, the left responsive menu disap

  • Dynamically enable/disable VF inputfield1 based on selected picklist value of field2June 5

    I have a requirement, where I have to make custom field enable and disable on the basis of a chosen value of a Picklist field. I have Picklist field Pricing_Option__c which has 3 values : Lowest Doscount, Specific Discount, and Highest Discount. Ther

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.394 s.