title: HTTP Status 403 - Expected CSRF token not found
body: <p>I am doing post to the server from the angular $http and I am getting </p>
  
  <pre><code>HTTP Status 403 - Expected CSRF token not found. 
  </code></pre>
  
  <p>As I could find <a href="https://stackoverflow.com/questions/28138864/expected-csrf-token-not-found-has-your-session-expired-403">here</a> one solution is to disable the CSRF, but I am not sure that is what I want. Please let me know how to solve this problem.</p>
  
  <p>I am using Angular JS in the front end and Spring MVC 4 with Spring security 3.2 at the server side.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p><strong>SecurityConfig.java</strong> </p>
  
  <pre><code>@Override
      protected void configure(HttpSecurity http) throws Exception {
          http
              .formLogin()
                  .loginPage("/signin")
                  .loginProcessingUrl("/signin/authenticate")
                  .failureUrl("/signin?param.error=bad_credentials")
              .and()
                  .logout()
                      .logoutUrl("/signout")
                      .deleteCookies("JSESSIONID")
              .and()
                  .authorizeRequests()
                      .antMatchers("search/**", "/c/**","/admin/**", "/favicon.ico", "/resources/**", "/auth/**", "/signin/**", "/signup/**", "/disconnect/facebook"/*, "/**"*/).permitAll()
                      .antMatchers("/**").authenticated()
              .and()
                  .rememberMe()
              .and()
                  .apply(
                      new SpringSocialConfigurer());
      }
  </code></pre>
  
  <p><strong>Angular JS ajax request :</strong></p>
  
  <pre><code>$http({
          method: 'POST',
          url: 'addCampaign',
          data: JSON.stringify(newCampaign)
      }).
      success(function (data, status, headers, config) {
  
          //TODO Notification to show the campaign was successfully saved
          $log.info("campaign successfully saved");
      }).error(function (data, status, headers, config) {
          $log.info("campaign could not be saved" + data + " " + status + " " + headers + " " + config);
          //TODO to show notification that the campaign could not be saved succeffsully.
      });
  </code></pre>