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
0
votes
1 answer

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

Is there a mod / way to get this pseudo code working in apache? if not value of request header 'x-token' is 'secret' deny
0
votes
1 answer

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 that authenticates them. I have a PHP script…
0
votes
1 answer

Apache not return allow header in OPTIONS method

I try to get allow header form apache server. I sended request with curl. The server return headers but not "header allow" header: $ curl -v -X OPTIONS 10.0.0.1 * Rebuilt URL to: 10.0.0.1/ * Hostname was NOT found in DNS cache * Trying…
amiad
  • 161
  • 1
  • 1
  • 7
0
votes
0 answers

google webmaster soft 404 on 301

I'm looking through google webmaster that my page is generating soft 404 errors (https://support.google.com/webmasters/answer/181708?hl=en) google says: We recommend that you always return a 404 (Not found) or a 410 (Gone) response code in response…
0
votes
2 answers

Apache - force set 304 status for all images

Is it possible to force set HTTP 304 status for all images? I wrote code below in my vhost, but now instead 404/304 status I get 500 Header set 304 "HTTP/1.0 304 Not Modified" I have…
Debian
  • 11
  • 1
0
votes
1 answer

nginx proxy_pass receive content/status headers when http 4xx

Was having some trouble as chronicled here - https://stackoverflow.com/questions/22570550/play-2-2-1-simpleresult-4xx-response-body-possible-via-cors-xhr But I didn't focus on nginx since the 200 OK happy path was working as expected. It was 400…
notbrain
  • 209
  • 3
  • 16
0
votes
1 answer

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, add_header directive. c) If no results returned (eg:…
anonymous-one
  • 1,018
  • 7
  • 27
  • 43
0
votes
1 answer

Cache header for dynamically created url

I have a PHP script that generates a thumbnail based on an existing path (more info). The basic idea is this: Given the document root /web/, an image lives in /web/images/foo.jpg. When a predefined thumbnail filter named thumb is requested in the…
Peter Kruithof
  • 87
  • 1
  • 11
0
votes
1 answer

Tell browsers to cache until last modified date changes?

My web site consists of static HTML files which are usually republished once per day, and sometimes more. I'm using Apache. In the vhost settings for my site, I'd like to tell browsers to cache HTML files indefinitely, until Apache sees that they…
Chad Johnson
  • 489
  • 2
  • 7
  • 14
0
votes
3 answers

htaccess filesMatch exclusion

I have the following directive in my htaccess FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache,…
Hikari
  • 107
  • 3
  • 12
0
votes
1 answer

How to print out all request headers of HTTP requests on the server side?

I have a HAProxy configuration which balances requests to many servers. I want to compare the outgoing request headers when requests go thru HAProxy to the ones I would make directly to my servers. For example, I want to test if my HAProxy…
sebwinadmin
  • 505
  • 2
  • 6
  • 11
0
votes
1 answer

Can I set a content type if the origin doesn't send one in mod_proxy?

I have a misbehaving origin that when it has an error page it is not setting a content-type header. This is then a problem as we're sitting behind Edgecast and they default to application/octet-stream which causes browsers to try and download the…
Glenn Slaven
  • 2,400
  • 2
  • 30
  • 42
0
votes
1 answer

How do I set up a conditional redirect in Tomcat

I have Tomcat running Jira. I have two DNS names that are attached to this site - mysite.myorg.com and mysite.myorg.net. I want the mysite.myorg.com to redirect all users to mysite.myorg.net since I have my ssl certificate set up for the .net…
Corvin
  • 111
  • 1
  • 4
0
votes
1 answer

Sending two Content-Security-Policy headers

I current have an nginx server that is sending the Content-Security-Policy header, however I've read that apparently IE only supports "X-Content-Security-Policy". Would it be a good idea to send both Content-Security-Policy and…
Concrete Donkey
  • 435
  • 5
  • 8
0
votes
2 answers

Can't get nginx to reply to ab with compressed content

ab -n 1 -H 'Accept-Encoding: gzip, deflate' http://mywebsite.com/ This always returns the uncompressed content (I can see that both from its size and because I'm sniffing the traffic with ngrep). However, if I request the content with Firefox, the…
Antonis Christofides
  • 2,598
  • 2
  • 23
  • 35