insomnia-mockbin icon indicating copy to clipboard operation
insomnia-mockbin copied to clipboard

Some headers are overwritten

Open subnetmarco opened this issue 9 years ago • 1 comments

Some headers are being overwritten, like X-Forwarded-Proto. The following example should return X-Forwarded-Proto: Test in the response, but instead it returns another value.

$ curl -H "X-Forwarded-Proto: Test" http://mockbin.com/request
{
  "startedDateTime": "2015-05-15T01:36:11.412Z",
  "clientIPAddress": "40.140.33.170",
  "method": "GET",
  "url": "http://mockbin.com/request",
  "httpVersion": "HTTP/1.1",
  "cookies": {},
  "headers": {
    "host": "mockbin.com",
    "connection": "close",
    "accept-encoding": "gzip",
    "x-forwarded-for": "40.140.33.170, 199.27.133.251",
    "cf-ray": "1e6b1c4668770293-SJC",
    "x-forwarded-proto": "http",
    "connect-via-ip": "104.24.103.220",
    "connect-via-host": "mockbin.com",
    "cf-visitor": "{\"scheme\":\"http\"}",
    "user-agent": "curl/7.37.1",
    "accept": "*/*",
    "cf-connecting-ip": "40.140.33.170",
    "x-request-id": "858a9c19-8e6d-4c5a-9d6b-3c23dad5ce2b",
    "x-forwarded-port": "80",
    "via": "1.1 vegur",
    "connect-time": "4",
    "x-request-start": "1431653771403",
    "total-route-time": "0"
  },
  "queryString": {},
  "postData": {
    "mimeType": "application/octet-stream",
    "text": "",
    "params": []
  },
  "headersSize": 530,
  "bodySize": 0
}

subnetmarco avatar May 15 '15 01:05 subnetmarco

right, this is due to Mockbin sitting behind cloudflare ... which over-writes with its own headers ... i'm not happy with the cloudflare caching layer, and actually plan on moving mockbin out ... might do it this weekend.

ahmadnassri avatar May 15 '15 03:05 ahmadnassri