From 9498e3e89eace756dc0d4414df1669a6790d8f53 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 14 Jan 2016 09:46:06 +0100 Subject: [PATCH] Fix trailing / to avoid redirects during posts. --- accountant/frontend/static/js/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/accountant/frontend/static/js/app.js b/accountant/frontend/static/js/app.js index e50d87f..04d99ee 100644 --- a/accountant/frontend/static/js/app.js +++ b/accountant/frontend/static/js/app.js @@ -42,8 +42,8 @@ var accountantApp = angular.module("accountantApp", [ }]) -.config(["$httpProvider", "$routeProvider", "$locationProvider", "$storageProvider", - function($httpProvider, $routeProvider, $locationProvider, $storageProvider) { +.config(["$httpProvider", "$routeProvider", "$locationProvider", "$storageProvider", "$resourceProvider", + function($httpProvider, $routeProvider, $locationProvider, $storageProvider, $resourceProvider) { // Define interceptors. $httpProvider.interceptors.push('sessionInjector'); @@ -75,6 +75,9 @@ var accountantApp = angular.module("accountantApp", [ // Change the enabled storage engines // Defaults to ['memory', 'cookie', 'session', 'local'] $storageProvider.setEnabledStorageEngines(['local', 'session']); + + // Keep trailing slashes to avoid redirect by flask.. + $resourceProvider.defaults.stripTrailingSlashes = false; }]) .run(function(editableOptions) {