Do only send X-Requested-With header via ajax.

This commit is contained in:
Martin Edenhofer 2017-05-12 01:27:41 +02:00
parent 862ec3706d
commit 75fb615f3d

View file

@ -27,7 +27,7 @@ class App.Track
class _trackSingleton class _trackSingleton
constructor: -> constructor: ->
@trackId = 'track-' + new Date().getTime() + '-' + Math.floor( Math.random() * 99999 ) @trackId = "track-#{new Date().getTime()}-#{Math.floor(Math.random() * 99999)}"
@browser = App.Browser.detection() @browser = App.Browser.detection()
@data = [] @data = []
# @url = 'http://localhost:3005/api/v1/ui' # @url = 'http://localhost:3005/api/v1/ui'
@ -39,7 +39,6 @@ class _trackSingleton
@log('start', 'notice', {}) @log('start', 'notice', {})
# start initial submit 30 sec. later to avoid ie10 cookie issues # start initial submit 30 sec. later to avoid ie10 cookie issues
delay = => delay = =>
App.Interval.set @send, 60000 App.Interval.set @send, 60000
@ -153,6 +152,8 @@ class _trackSingleton
log: newDataNew log: newDataNew
) )
crossDomain: true crossDomain: true
headers:
'X-Requested-With': 'XMLHttpRequest'
error: => error: =>
for item in newDataNew for item in newDataNew
@data.push item @data.push item