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.

learn more… | top users | synonyms

4
votes
2answers
2k views

Set header in apache if it doesn't already exist

I have a proxy that is injecting some headers but I want to modify it so it only sets the headers if they are not already present: <Location /api> RequestHeader set MY_HEADER "value" ...
0
votes
0answers
16 views

406 Not Acceptable response ONLY with large Content-Length [closed]

I'm getting a 406 Not Acceptable response from a GoDaddy Shared Apache server upon making the following request through posting a form directly from the browser: HEADERS: Host: url User-Agent: ...
0
votes
0answers
37 views

Apache Header Module Loaded but can't set headers in htaccess

I have Apache 2.2.29 (unix) setup and running on my new dev machine (mac). I am trying to set CORS headers for an API project - something that I have done many times. The htaccess file for the ...
0
votes
1answer
2k views

Cache Control Headers with IIS 7.5

I'm trying to wrap my head around client side (web browser) caching and how it works in relation to IIS 7.5 cache control headers. In particular: If we want to force clients to reload cached ...
0
votes
0answers
32 views

font-awesome not displaying on Nginx, Rails 4, mina/puma

I made some changes to the nginx config file and I now cannot see any of the font-awesome fonts on FF and Chrome. The fonts are precompiled and in this directory: ...
0
votes
1answer
2k views

mod_expires doesn't set expiry for images (png,jpeg,gif)

I am using this below configuration in my apache2.conf <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 6 month" ExpiresByType image/jpg "access plus 6 ...
1
vote
1answer
52 views

is there a standard for chaining x-forwarded-for headers?

IETF RFC 2616 Section 4.2 allows a request to contain multiple headers with the same field-name as long as chronological order of insertion is preserved and their values can be converted into single ...
0
votes
1answer
32 views

Protocol-relative URL in CSS file is being overwritten

I have this code: <?php header('Content-Type: text/css; charset=utf-8'); ?> a.logo{background:url(//webzina.net/img/logo.png) no-repeat 100% 0} Locally (PHP Version 5.3.5), I get: ...
1
vote
1answer
11 views

Calculate HTTP Digest

I am just trying to calculate the response for an HTTP Digest Authentication. Imagine the example from RFC2617. I extracted the folling variables: USER="Mufasa" REALM="testrealm@host.com" ...
0
votes
1answer
321 views

GoAccess analytics and HTTP Referer

This is a high-level question regarding using goaccess as a tool for website analytics. I have it set up on an nginx server and parsing the logs just fine, but it seems that many requests to my own ...
3
votes
1answer
872 views

nginx + @font-face + Firefox / IE9

Just transferred my site from a shared hosting to Linode's VPS, and I'm also completely new to nginx, so please don't be harsh if I missed something evident ^^ I've got my WordPress site running ...
0
votes
0answers
5 views

What cache control headers will prevent revalidation? [duplicate]

I'm trying to set cache control headers on a /static/ directory such that browsers will use a cached copy of the file without revalidating it. Links to files in this directory include the timestamp ...
2
votes
0answers
170 views

How can the x-frame-options HTTP header of ADFS 3 be manipulated?

By default, ADFS 3 responses contain the "X-Frame-Options: DENY" HTTP header. This prevents ADFS from being run in an iframe, because this presents an opportunity for clickjacking attacks. At the ...
1
vote
1answer
88 views

How can the HSTS header be added to WebLogic?

Is there an implementation for using the Strict-Transport-Security header to WebLogic? I figure it would be using something in web.xml under <security-constraint> I know how to do this for an ...
0
votes
0answers
18 views

How to make this pound config work

I'm trying to have pound match on the Host header, and then modify the header before making the request. Something like: Service HeadRequire "Host: company.something.com" HeadRemove "Host" ...
5
votes
2answers
108 views

apache: Send request URI within HTTP header for static files

To fulfil the requirements of the PubSubHubbub 0.4 spec, I have to send a rel=self header for each file. I'm now trying to do that with Apache's mod_headers and environment variables: Header append ...
1
vote
1answer
89 views

Included rewrite rules not matched

With Apache, I'm trying to set up a rewrite rule which will be included in several virtual hosts. Actually, this rule file is included in 2 vhost. The first vhost contains only this rewrite rule (and ...
1
vote
1answer
215 views

Is setting a Content Security Policy incompatible with Joomla's admin page?

I'd like to set a content security policy header for a Joomla website running on Apache 2.4. Using this configuration from h5bp and setting Header set Content-Security-Policy "script-src 'self'; ...
1
vote
1answer
22 views

Is Strict-Transport-Security HTTP header name case-sensitive?

I'm digging into the HTTP Strict-Transport-Security specification, https://tools.ietf.org/html/rfc6797 It specifies the syntax of the header like this: Strict-Transport-Security: max-age=15768000 ; ...
0
votes
1answer
118 views

Nginx using mysql result as variable to be used in headers more module

Without going into too much detail we have a requirement for the following: a) Query a simple single column, single row result from mysql. b) Use this variable as part of a more headers module, ...
1
vote
3answers
454 views

How do I add no-cache headers to all 404 pages served by apache and nginx?

I have recently run into an issue after switching to Cloudflare, and the solution is to basically stop Cloudflare from caching 404 responses. In our load-balanced multi-server setup, occasional 404s ...
0
votes
0answers
29 views

Apache header order

I am working on a private server application for a web based mobile game that uses php to generate responses. In order to do this I am trying to replicate the behavior of the main server as closely as ...
0
votes
0answers
90 views

apache2 ubuntu 14.04. Expire date has been set, but it is not cached anyway

As shown in screenshot, the expire date is 11 May 2016 (a year from now), but the resource is always downloaded everytime I access the website. I set expire date by using htaccess: <IfModule ...
-1
votes
1answer
203 views

The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF [closed]

I've tested my website with mxtoolbox.com and got this message: Result: The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF I've googled around ...
1
vote
1answer
74 views

Is there a way to make GoogleImageProxy honor Cache-Control / expiration headers?

I am suddenly getting flooded with requests from Google's image proxy servers that look like the following: 66.249.81.250 - - [04/May/2015:06:55:54 +0000] "GET /images/image_1.jpg HTTP/1.1" 200 93394 ...
6
votes
2answers
105 views

Does Nginx `if_modified_since` only work on static resources?

I can't seem to find enough documentation. I have an app that generates some dynamic responses, but could still benefit from the Last-Modified header -- so I send it. However, turning on ...
2
votes
2answers
38 views

What's the purpose of spammy HTTP referers?

In the logs of my website, there's a lot of visits with a HTTP referer set to spam-like websites (usually Russian sites, I've noticed). I assume what they're doing is just using a web crawler to visit ...
0
votes
0answers
96 views

Nginx: How to access my reverse proxied sites via separate subdirectories

I have 2 web applications that I want available under http://example.com/demo1 and http://example.com/demo2. My config below correctly reverse proxies to each site, and the site is mostly functional, ...
1
vote
1answer
47 views

Unable to combine RewriteRule and Header set [duplicate]

Trying to implement the following: RewriteRule \.ttf$ - [E=cors:1] Header set Access-Control-Allow-Origin "*.example.com" env=cors:1 Header set Access-Control-Allow-Origin "*.sadface.com" env=!cors:1 ...
0
votes
0answers
76 views

HTTP response returns valid content-length header but no message body

I've recently found a very strange problem which I can't explain. After posting a HTTP request to our server occasionally the following response will occur: HTTP/1.1 200 OK Date: Mon, 13 Apr 2015 ...
1
vote
0answers
31 views

Date Header always has the same date

I have a server running Windows 2012 with IIS 8.5 that is hosting several sites. For every response that is returned from a client request to any of the sites the Date header has the same value: Key ...
0
votes
2answers
421 views

With nginx serve a custom 404 page with header 404, without changing the browseraddress

How do I force nginx to serve a custom 404 page while responding with a 404 header, without changing the address of the browser so the user can easily retype? set $allowed 0; #(updated after ...
0
votes
0answers
197 views

Error: No 'Access-Control-Allow-Origin' header is present on the requested resource. (NGINX)

I am using NGINX and I am receiving that error in the browser's console. I am so frustrated. According to my boss, I need to set up cors which what I did and still I am getting the same error. This ...
0
votes
1answer
1k views

nginx proxy_pass rewrite of response header location

The aim of this nginx instance is to get GitLab and OpenWRT Luci to redirect through a reverse proxy. It's already working for several other websites, all which have a base url which seems to counter ...
5
votes
1answer
2k views

add_header directives in location overwriting add_header directives in server

Using nginx 1.2.1 I am able to add multiple headers using add_header as follows: server { listen 80; server_name localhost; root /var/www; add_header Name1 Value1; <=== ...
3
votes
1answer
2k views

Apache reverse proxy not preserving headers

Does anyone know if there is something strange going on? It seems that my reverse proxy setup, doesn't preserve the correct caching headers from the original virtualhost. Let me explain... I am ...
0
votes
0answers
45 views

How to preserve the name of the remoteUser while reverse proxy?

I am using a software which enables me to log my operations and one the things it is loggin is the name of the remote user. Neverthless, I have a little problem since I am working on a secured ...
-1
votes
1answer
66 views

Apache configuration redirect using only redirect, not rewrite

PS: this is the 2nd part of the question originally posted here. I'd like to disable the HSTS header completely for specific virtual hosts. I have (per recommendation) a redirect in the 443 container ...
0
votes
0answers
43 views

Apache2 Header set Server unexpected result

I'm running Apache/2.4.7 on Ubuntu. I'm trying to get the response "Server" header to include a less verbose response. curl -I my.domain.com returns Server: Apache. I can live with that. But curl -I ...
1
vote
1answer
273 views

Set Access-Control-Allow-Origin Header for specific URL that has a Query String

I'm asking this here as a last resort after trying different things / asking google / reading http://httpd.apache.org/docs/2.2/ I have the following in my apache2.conf # Allow cross domain fonts ...
0
votes
0answers
79 views

Amazon ELB + EC2 Header mismatch

Preamble: I have an AWS Elastic Load Balancer in front of a Single Amazon EC2 instance. I have 3 other EC2 instances sending requests via curl to the Load Balancer. Direct requests to the EC2 ip has ...
0
votes
2answers
82 views

Decrypt a Header in Apache (HTTPD)

I've been asked to have a look at whether it's possible to decrypt a header during the processing of the request. The specific use case is to respond to the decrypted contents of the header by ...
1
vote
1answer
70 views

How to avoid duplication of add_header directives in nginx?

The documentation says this: These directives are inherited from the previous level if and only if there are no add_header directives defined on the current level. My problem is that I have ...
9
votes
11answers
999 views

.htaccess doesn't redirect to www-prefixed page properly

I'm trying to redirect an url without www. to www.version (example.com to www.example.com). I use the usual RewriteCond %{HTTP_HOST} ^example\.com [nc] RewriteRule (.*) http://www.example.com/$1 ...
-1
votes
1answer
177 views

Mikrotik: Add HTTP Header Parameter to Requests [duplicate]

I want to add a parameter of MikroTik to all HTTP header requests using MikroTik. So all client and servers that connected to the MikroTik can trace the parameter in their HTTP header. How can I ...
6
votes
2answers
4k views

Nginix proxy caching - how to check if it is working?

I have set up my nginx.conf file to use proxy caching from tutorials I have found online. However, I am trying to figure out how to check if it is actually working. I've read somewhere that adding ...
2
votes
1answer
424 views

What is the meaning of an IIS http status code 404.503?

Microsoft lists the IIS http status codes including the substatus codes here. In the 404 section there are substatus codes between 0 and 20, but in my logs I get a 503 as sc-substatus I can't find ...
2
votes
0answers
72 views

HAProxy: Limmit concurrent connections based on HTTP header field

I try to limit the number of concurrent connections using HAProxy stick-tables based on HTTP header fields. I could find plenty of examples using IP addresses, but this doesn't work in my case. Our ...
1
vote
0answers
33 views

Script to verify/monitior HTTP caching headers [closed]

We'd like to verify that all our websites use the correct HTTP caching headers. Is there a script out there to make a request to a website, check its response headers and report whether it will be ...
2
votes
2answers
276 views

Redirect depending on preferred language (Accept-Language) with .htaccess

When users request /, I want to redirect them to /en or /de, depending on their preference specified in the HTTP request header Accept-Language. I guess this is easy with server-side scripting, but I ...