Do only send X-Requested-With header via ajax.
This commit is contained in:
parent
862ec3706d
commit
75fb615f3d
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue