Questions tagged [http-headers]

HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.

HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.

Refer to RFC 2616

624 questions
5
votes
1 answer

Nginx add_header doesn't work in one of my location blocks?

I use nginx 1.10.1 with config similar to this: server { (...) add_header Header1 "value"; (...) # in this location above add_header directive works location / { uwsgi_pass unix:/var/run/some.sock; (...) …
Greg Dubicki
  • 1,239
  • 1
  • 17
  • 33
5
votes
1 answer

Passing Authorization Basic Headers Along in Proxy

I am currently trying to get a reverse/forward proxy to pass along the authorization headers to the target server. How would I go abou this? I have already looked at the below sources, and one of the comments states that this only works for…
HSchmale
  • 223
  • 2
  • 12
5
votes
1 answer

Custom headers (mod_headers) not showing in combination with mod_rewrite

I have a vhost with multiple domainnames linked to it. I'm trying to send additional headers when a request is made to one particular domainname. Here's what I'm doing (tried both in the vhost as in .htaccess, results are the same) SetEnvIf HOST…
Tom Cannaerts
  • 211
  • 1
  • 8
5
votes
2 answers

HAProxy rspadd or set-header

I am currently trying to improve my HAProxy HTTPS configuration. There seems to be two ways to set additional fields to response headers in HAProxy. I currently use http-response set-header, which should, if I understand it right: Check if the…
ITChap
  • 183
  • 1
  • 8
5
votes
2 answers

Nginx/Apache: set HSTS only if X-Forwarded-Proto is https

I got the following setup: Internet => nginx[public:80 +443, SSL termination) => Varnish[localhost:81] => Apache[localhost:82] Now some sites should only be reachable via HTTPS and a valid SSL certificate. For these few exceptions I'd like to…
weeheavy
  • 4,089
  • 1
  • 28
  • 41
5
votes
2 answers

Apache: Force HTTP 1.1 or Persistent/KeepAlive connections for HTTP 1.0 requests

I want to force Keep Alive or Persistent connections for all HTTP requests on my Apache 2.2.3 server running on RHEL 5.8. A lot of web crawlers are using HTTP 1.0 for some reason, and I would like to either force persistent connections, or somehow…
usedTobeaMember
  • 616
  • 15
  • 25
5
votes
3 answers

Only allow the POST method for a specific file in a directory

I have one file that should only be accessible via the POST method. /var/www/folder/index.php The document root is /var/www/ and index.php is nested inside a folder. Version of Apache is: 2.4.4. My configurations are as follows:
Dave Chen
  • 53
  • 1
  • 1
  • 10
5
votes
4 answers

nginx is cutting the end of dynamic pages and caching them

I moved one of my old sites from an Apache to an nginx server. Everything is working fine but the site has some long content (a +100k generated HTML file). My first trial was to disable chunked transfer encoding, but that did not help. Here it is my…
oliver nadj
  • 171
  • 2
  • 8
5
votes
2 answers

Gzip compression with nginx

In my nginx.conf I have: gzip on; gzip_static on; gzip_buffers 16 8k; gzip_comp_level 9; gzip_http_version 1.0; gzip_min_length 1000; gzip_types text/plain text/css image/x-icon image/bmp image/png image/gif…
Jerry
  • 61
  • 1
  • 1
  • 3
5
votes
2 answers

nginx: Specify custom headers in rewritten location blocks

I'm trying to set some headers only for specific location blocks in nginx. The problem I have is that those location blocks contain rewrite statements, which apparently seem to drop the custom headers. In this example, I have two rules I…
Etienne Perot
  • 103
  • 1
  • 8
5
votes
3 answers

Is my webserver allowing pre-fetching?

I have an image based website that hosts multiple galleries. When a user clicks one of the images the views property for the particular image is incremented. However, I noticed when using Firefox (14.0.0.1) it increments the views twice, whereas…
Lee
  • 73
  • 7
5
votes
3 answers

How to remove "Client-Peer" (etc) header in nginx with php-fastcgi

My setup: OS: Ubuntu 11.04 HTTP Server: nginx 1.2.1 compiled with the HttpHeadersMore module processing PHP via php-fastcgi (other irrelevant software - ruby, python, etc) My problem: I'm trying to completely mask the software which serves the…
clinton3141
  • 163
  • 1
  • 6
5
votes
7 answers

Adding an HTTP request header with Squid

I want to permit my users to login to Google apps only for my domain. I found a solution by adding the HTTP header X-GoogApps-Allowed-Domains as described in this Google help page. I use Squid, but can't figure out how to configure Squid to do this.…
boblin
  • 151
  • 1
  • 1
  • 4
5
votes
1 answer

How to log effective outgoing HTTP requests made by Squid, with headers after adaptation?

I use Squid to modify some HTTP headers sent by clients. For testing purposes, I want to completely delete the 'User-Agent' header. Here is my config : request_header_access User-Agent deny all header_replace User-Agent Timmy logformat mylogformat…
mishka
  • 142
  • 2
  • 6
5
votes
3 answers

NGINX Pass-through server header

How do I get NGINX to pass through the 'server' header of upstream servers? Like, if NGINX is proxying to an Apache server with the Server header 'Apache2.2 (CentOS)', it strips it out and replaces it with 'NGINX/1.0.1'. We have our machine ID's in…
user80776