~lamont/maas/bug-1645912-2.1

« back to all changes in this revision

Viewing changes to src/maasserver/static/js/angular/maas.js

  • Committer: LaMont Jones
  • Date: 2016-10-12 15:26:17 UTC
  • mfrom: (5469 maas)
  • mto: This revision was merged to the branch mainline in revision 5482.
  • Revision ID: lamont@canonical.com-20161012152617-t14n2jt7y5b7hidb
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 */
10
10
 
11
11
angular.module('MAAS', ['ngRoute', 'ngCookies', 'ngTagsInput']).config(
12
 
    function($interpolateProvider, $routeProvider) {
 
12
    function($interpolateProvider, $routeProvider, $httpProvider) {
13
13
        $interpolateProvider.startSymbol('{$');
14
14
        $interpolateProvider.endSymbol('$}');
15
15
 
 
16
        // Set the $httpProvider to send the csrftoken in the header of any
 
17
        // http request.
 
18
        $httpProvider.defaults.xsrfCookieName = 'csrftoken';
 
19
        $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
 
20
 
16
21
        // Helper that wrappers the templateUrl to append the files version
17
22
        // to the path. Used to override client cache.
18
23
        function versionedPath(path) {