diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-10-10 17:09:09 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-10-10 17:09:09 -0400 |
commit | 181b9f8beb296dbeef1739d4212ab2c3b8667756 (patch) | |
tree | c66ad0857997ac38fb83da83eafa7643c8c43416 | |
parent | 3199de391f6a02567f05e08495ee916eda1dd322 (diff) |
Correctly passes header from web.
-rw-r--r-- | web/index.html | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/web/index.html b/web/index.html index a8e28a8..a17562e 100644 --- a/web/index.html +++ b/web/index.html @@ -107,10 +107,7 @@ $('.g-signin2').remove(); $.ajax({ url: '/api/test', - headers: {'X-Token:': id_token}, - beforeSend: function(request) { - request.setRequestHeader('Token', id_token); - }, + headers: {'X-Token': id_token}, success: function(data) { console.log('Success:', data); }, @@ -119,21 +116,6 @@ } }); }; - - // $(document).ready(function() { - // fetchAlbums(); - // $.ajax({ - // url: '/api/test', - // type: 'GET', - // headers: {"X-Token": "foo"}, - // success: function(data) { - // console.log("Success. got response " + data); - // }, - // error: function(data) { - // console.log("Success. got response " + data); - // } - // }); - // }); </script> </head> <body> |