Skip to content

Commit

Permalink
Do only send X-Requested-With header via ajax.
Browse files Browse the repository at this point in the history
  • Loading branch information
martini committed May 11, 2017
1 parent 862ec37 commit 75fb615
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/app/lib/app_init/track.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -153,6 +152,8 @@ class _trackSingleton
log: newDataNew
)
crossDomain: true
headers:
'X-Requested-With': 'XMLHttpRequest'
error: =>
for item in newDataNew
@data.push item
Expand Down

0 comments on commit 75fb615

Please sign in to comment.