primaryobjects / grocery-digital-coupons

Grocery Digital Coupon Automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move token to http-header

primaryobjects opened this issue · comments

Modify index.js to change the status and delete methods to include the token in the http-header instead of the url.

  $.ajax({
      type: 'GET',
      url: '/api/status',
      contentType: 'application/json',
      headers: {
        'token': param('token')
    }
$.ajax({
      type: 'DELETE',
      url: '/api/status',
      contentType: 'application/json',
      headers: {
        'token': param('token')
    }