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
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()
@data = []
# @url = 'http://localhost:3005/api/v1/ui'
@ -39,7 +39,6 @@ class _trackSingleton
@log('start', 'notice', {})
# start initial submit 30 sec. later to avoid ie10 cookie issues
delay = =>
App.Interval.set @send, 60000
@ -153,6 +152,8 @@ class _trackSingleton
log: newDataNew
)
crossDomain: true
headers:
'X-Requested-With': 'XMLHttpRequest'
error: =>
for item in newDataNew
@data.push item