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

0
votes
0answers
8 views

Setting “inline” content-disposition for static file download

Is there a way to set the "inline" content-disposition for static PDFs being downloaded through our website on IIS (8 or 8.5)? We have a company who is trying to scrape information off our website, ...
1
vote
1answer
18 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 ...
-1
votes
0answers
19 views

SQUID and GreasySpoon(ICAP server) changing the header

I am trying to use GreasySpoon and SQUID. As basic case i just wanted to change header of the response. //——————————————————————- // ==ServerScript== // @name Add_Header // @status on // @description ...
0
votes
0answers
24 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 ...
2
votes
1answer
27 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 ...
1
vote
0answers
22 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
0answers
100 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
99 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 ...
0
votes
0answers
36 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 ...
0
votes
0answers
23 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 ...
0
votes
0answers
37 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 and served by Varnish. Using this configuration from h5bp and setting Header set Content-Security-Policy ...
0
votes
0answers
38 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 ...
1
vote
1answer
127 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
2answers
56 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
31 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 ...
0
votes
0answers
49 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
votes
1answer
83 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 ...
2
votes
1answer
148 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 ...
1
vote
0answers
52 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
30 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
200 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 ...
0
votes
1answer
100 views

HEAD requests from Linux/Ubuntu boxes

I don't know if this falls under server fault. We have HEAD requests disabled on our server. But we see thousands of HEAD requests, always with the same user agent. 'X11; Linux x86_64 chrome. It ...
1
vote
0answers
81 views

Partial content 206 requests on nginx behind WebAuth

I'm having a troubleshooting an issue that I think is likely due to WebAuth authentication when serving .webm videos. The server I have is nginx 1.6.2. I can make 200 GET requests just fine. I also ...
3
votes
0answers
357 views

Haproxy: reject traffic by user agent from file

I am trying to reject connections from specific user agents (by matching a substring of the user-agent header) using an haproxy ACL with -f option to read from a file. However it is not working, it ...
0
votes
1answer
129 views

Configure Server to Initiate Http Keep-Alive

I have a set of clients that aren't including an http keep-alive header in their requests to my server. If I use something like Varnish to filter the incoming requests and add the keep-alive header ...
0
votes
1answer
148 views

NGiNX Custom Cache param based on regex match

My question(s) are as follows: How do I set custom variables based on regexp against a useragent? How do I set custom headers for the reverse-proxy request? How do I use these values as caching ...
0
votes
0answers
45 views

Enable charset header in nginx 301

I have nginx redirecting http requests to https. Currently the header in the redirect is Content-Type: text/html. I want it to be Content-Type: text/html;charset=utf-8. Here it says I need a custom ...
1
vote
2answers
320 views

Is it possible to set SSL/TLS version HTTP header with Apache which an backend application can use?

There is one service on a virtual machine with a dedicated IP that required to be accessible via SSLv3 (WinXP with IE6 clients). I moved that service several several years ago to a that virtual ...
0
votes
0answers
119 views

Set Headers for JSON in Apache proxy

Hello I try set header JSON in Apache proxy. I need this for test login in website. Below I put my apache config. <VirtualHost *:80> ServerName zx.xxxxxxx.xxxxxx.fr ServerAdmin ...
0
votes
0answers
28 views

Setting an Apache header's value based on a mapping?

Suppose I have an environment variable REMOTE_ROLES having a comma-separated list of value(s), e.g., "A, B, C". I want to set an HTTP request header X-Remote-Roles to a comma-separated list of those ...
0
votes
2answers
316 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
2answers
160 views

Nginx silently dropping header lines that exceed 1128 bytes

I have Nginx set up as a reverse proxy to a uWSGI application (a Django app). Due to the nature of the content that the Django app is hosting, sometimes the URLs get long. Really long. Because of ...
-1
votes
1answer
148 views

Debug Nginx caching

I want to determine when I am getting cache hits or misses. Preferably, this would be a header, like X-Cache: HIT or X-Cache: MISS How can I do this with Nginx (a reverse proxy for the upstream ...
-1
votes
1answer
76 views

Does Nginx respect maxage from upstream server?

I see the proxy_cache_valid directive, but that confuses me. In HTTP, doesn't the upstream server specify this with Cache-Control and maxage? How do I get Nginx's cache to use maxage ?
-1
votes
1answer
61 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 ...
-1
votes
1answer
61 views

Serve static files from directory depending on http referrer inside of nginx [closed]

My server hosts images, but the content of images have to be different for the same link and have to deepens on http referrer. For example: Website 1 load image website1.jpg from ...
1
vote
1answer
66 views

how to find out if mod_xsendfile is handling the transfer?

I just installed and configured mod_xsendfile on my apache2.2.15 web server (on centos6.5). Everything seems to be working fine except that I'm not sure it is. I added XSendFile On and XSendFilePath ...
2
votes
2answers
346 views

Apache HSTS exception for some virtual hosts

In the global config section for Apache 2.2.15, I have the following (per recommendation) <IfModule mod_headers.c> Header add Strict-Transport-Security "max-age=15768000;includeSubDomains" ...
0
votes
1answer
644 views

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 ...
1
vote
1answer
97 views

Conditionally serving high resolution and WebP images with nginx

Not sure if I'm trying to pull off the impossible, but I'm wanting to configure Nginx to serve ".webp" files to browsers that support the file format and serve fallback files (i.e. pngs, jpgs, etc.) ...
4
votes
2answers
2k views

The Content-Length header does not exist

I have nginx server installed on Linux. When I send a request with curl, the Content-Length header is missing from the response. The 1.php file is: <?php echo "hello"; ?> The example ...
0
votes
0answers
180 views

handling CORS preflight request in Apache

I have a AngularJS app deployed using Yeoman. Cakephp RESTful backend. The Angular app sends in OPTIONS preflight requests, which the backend responds with forbidden (403), in nginx to solve this ...
0
votes
0answers
121 views

Override PHP Cache-Control Header from Apache config?

PHP is setting the Cache-Control header in multiple places. I don't want to break my code upgrade path, but I'd like to change the Cache-Control header in Apache config instead. However, it looks like ...
0
votes
1answer
39 views

Measuring HTTP traffic basic on URIs and custom headers

I'm currently working on an API service and one of the requirements is that we measure the amount of data used by each user of the system, and track how many times they use the API. So bandwidth usage ...
0
votes
1answer
21 views

Is it possible to path protect by header values in apache?

Is there a mod / way to get this pseudo code working in apache? <Location /somepath/> if not value of request header 'x-token' is 'secret' deny </Location>
1
vote
1answer
156 views

Under what scenarios would Apache allow a mismatched HTTP_HOST to pass through?

Someone has managed to pass an undefined HTTP_HOST server variable to my application script, triggering a series of errors. I am quite perturbed but am unable to replicate this behaviour. My httpd ...
0
votes
1answer
975 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
115 views

What is expected behaviour from Server returning Http 416

I have a server and sometimes when client ask for a file and if its request header Range may get over the length of file, so the server returns 416 status code. But I'm wondering should it write file ...
0
votes
1answer
576 views

Update Cache-Control max-age when srcache returns response from cache

I have configured Nginx to use srcache (along with the redis and redis2 modules). Server-side caching works great. My application responds with the appropriate Expires and Cache-Control headers, and ...
0
votes
1answer
437 views

Inconsistent behavior with Nginx's auth_request_set and more_set_input_headers

I'm trying to use the auth_request module in conjunction with the more_set_input_headers to automatically login my users into web apps. Basically, it works like this: Users have some session cookie ...