Scroll Top

No ‘Access-Control-Allow-Origin’ header is present on the requested resource

10.41K viewsrest api
0

This is CORS problem. http://enable-cors.org/

#Add these lines to your .htaccess file
Header set Access-Control-Allow-Origin "localhost"
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Header set Access-Control-Allow-Headers "X-Oc-Merchant-Language, X-Oc-Store-Id, Content-Type,X-Oc-Merchant-Id, X-Oc-Session"
Header set Access-Control-Allow-Credentials: true
RewriteRule .* - [E=HTTP_Authorization:%{HTTP:Authorization}]
Opencart API edited answer November 25, 2015
You are viewing 1 out of 1 answers, click here to view all answers.