Skip to content Skip to sidebar Skip to footer

How To Overcome Cors Redirect Issue While Performing Post Operation Via Ajax?

I'm able to get signed in to the roundcube instance (hosted at another server) via form submission with post method type from external login form. I'm getting this error (While sig

Solution 1:

You should try this:

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); 

You should add all methods in the header that you need access to.

Solution 2:

You can enable cross domain request in server with

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST'); 

Post a Comment for "How To Overcome Cors Redirect Issue While Performing Post Operation Via Ajax?"