I am getting an error like:
origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
This error occurs only when the design is integrated in codeigniter.
Please note who all added this question as duplicate. my question is not a duplicate question of this . My solution is added as the comment. Since, some geeks who think that, its a duplicate question, and reviewd it like so, I am not able to answer my own question. Once I get the privilage to add so, I will move the comment to answer.
Thankyou