Sha256: dc6f98491c297976bb226759ff24c3c8d94ac5fbf61c1cea93d00a0a2bfe5234

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

_super = jQuery.ajaxSettings.xhr

jQuery.ajaxSettings.xhr = ->
  xhr = _super()
  getAllResponseHeaders = xhr.getAllResponseHeaders
  xhr.getAllResponseHeaders = ->
    allHeaders = getAllResponseHeaders.call(xhr)
    return allHeaders if allHeaders

    allHeaders = ""
    for headerName in [ "Cache-Control", "Content-Language", "Content-Type", "Expires", "Last-Modified", "Pragma" ]
      do (headerName) ->
        allHeaders += headerName + ": " + xhr.getResponseHeader(headerName) + "\n"  if xhr.getResponseHeader(headerName)

    allHeaders
  xhr

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
firehose-0.2.alpha.3 lib/assets/javascripts/firehose/lib/jquery.cors.headers.js.coffee
firehose-0.2.alpha.2 lib/assets/javascripts/firehose/lib/jquery.cors.headers.js.coffee