Add comment concerning http provider setup

pull/1452/head
Till Breuer 11 years ago
parent fb3a5e0006
commit f80b5e2dde
  1. 6
      app/assets/javascripts/angular/openproject-app.js

@ -123,10 +123,14 @@ var openprojectApp = angular.module('openproject', [
window.appBasePath = jQuery('meta[name=app_base_path]').attr('content') || '';
openprojectApp
.config(['$locationProvider', '$httpProvider', function($locationProvider, $httpProvider) {
.config([
'$locationProvider',
'$httpProvider',
function($locationProvider, $httpProvider) {
$locationProvider.html5Mode(true);
$httpProvider.defaults.headers.common['X-CSRF-TOKEN'] = jQuery('meta[name=csrf-token]').attr('content'); // TODO find a more elegant way to keep the session alive
// prepend a given base path to requests performed via $http
$httpProvider.interceptors.push(function ($q) {
return {
'request': function (config) {

Loading…
Cancel
Save