AngularJS Post request does not work correctly on firefox
<p>I'm writing a website with AngularJS which communicates with an API on the server and provides some Info.
for Log in part I should send a http post request containing Email, Password and etc. It works fine on google Chrome and IE. I mean it sends the post request and gets a token. But in FireFox as I checked in Network, It sends an OPTION request and gets 200 but after that it does not send any post! hence my login would not disappear and I wont get any token.</p>

<p>what should I do for this situation?</p>

<p>App.config :</p>

<pre><code>  $httpProvider.defaults.withCredentials = true;
  $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8;';
  $httpProvider.interceptors.push('httpRequestInterceptor');
</code></pre>

<p>Function in service which sends request :</p>

<pre><code>    this.loginEmail = function(f_email, f_pass, deviceModel, deviceOs) {
    var data = $.param({
            email: f_email,
            password: f_pass,
            device_model: deviceModel,
            device_os: deviceOs
        });

        return $http({
            method: "POST",
            url: app.baseUrl + 'login_email/' + app.storeID + '/' + app.device_id,
            data: data
        }).success(function(response){
            return response.status;
        });
    /*return $http.post(app.baseUrl + 'login_email/' + app.storeID + '/' + app.device_id, data).success(function(response){
        return response.status;
    }).error(function(response){
        return response.status;
    });*/
};
</code></pre>

<p>Server Credentials are true</p>

<p>CORS seems fine because I can do get request</p>

<p><a href="https://i.stack.imgur.com/igrAv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/igrAv.png" alt="enter image description here"></a></p>

<p>EDIT:
Here's another thing that may be related to this problem:
in Chrome when I get logged in for get requests it sends the Token header
but for Post it doesn't</p>

<p>httpRequestInterceptor :</p>

<pre><code>app.factory('httpRequestInterceptor', function ($cookieStore) {
     return {
        request: function (config) {

        config.headers['Authorization'] = $cookieStore.get('Auth-Key');;
        config.headers['Accept'] = 'application/json;odata=verbose';
        return config;
     }
   };
});
</code></pre>