Fix trailing / to avoid redirects during posts.

This commit is contained in:
Alexis Lahouze 2016-01-14 09:46:06 +01:00
parent dae994abe9
commit 9498e3e89e

View File

@ -42,8 +42,8 @@ var accountantApp = angular.module("accountantApp", [
}]) }])
.config(["$httpProvider", "$routeProvider", "$locationProvider", "$storageProvider", .config(["$httpProvider", "$routeProvider", "$locationProvider", "$storageProvider", "$resourceProvider",
function($httpProvider, $routeProvider, $locationProvider, $storageProvider) { function($httpProvider, $routeProvider, $locationProvider, $storageProvider, $resourceProvider) {
// Define interceptors. // Define interceptors.
$httpProvider.interceptors.push('sessionInjector'); $httpProvider.interceptors.push('sessionInjector');
@ -75,6 +75,9 @@ var accountantApp = angular.module("accountantApp", [
// Change the enabled storage engines // Change the enabled storage engines
// Defaults to ['memory', 'cookie', 'session', 'local'] // Defaults to ['memory', 'cookie', 'session', 'local']
$storageProvider.setEnabledStorageEngines(['local', 'session']); $storageProvider.setEnabledStorageEngines(['local', 'session']);
// Keep trailing slashes to avoid redirect by flask..
$resourceProvider.defaults.stripTrailingSlashes = false;
}]) }])
.run(function(editableOptions) { .run(function(editableOptions) {