Spring security with AngularJS - 404 on logout

前端 未结 3 1566
梦如初夏
梦如初夏 2020-12-19 10:08

I\'m working with tutorial that describes how to write simple single-page app using Spring Boot, Spring Security and AngularJS: https://spring.io/guides/tutorials/spring-sec

3条回答
  •  情深已故
    2020-12-19 10:53

    Try to change $http.post('logout', {}) to this $http.post('\logout')

    So it will be like this:

    $scope.logout = function () {
        $http.post('\logout')
            .success(function () {
                // on success logic
            })
            .error(function (data) {
                // on errorlogic
            });
    }
    

提交回复
热议问题