cors - localhost Access-Control-Allow-Origin -


my local web app serving @ localhost:3000 wants access resources accessible @ localhost:8080/files (in directory .../www/files apache reads).

to around cors constraint, tried adding .../www/files/.htaccess content :

<ifmodule mod_headers.c>     header set access-control-allow-origin "http://localhost:3000"     header set access-control-allow-headers "origin, x-requested-with, content-type"     header set access-control-allow-methods "put, get, post, delete, options" </ifmodule> 

but still not work ("no 'access-control-allow-origin' header present on requested resource").

what missing ?

n.b. disabling cors in browser works, not want.

i figured out. first, .htaccess files unnecessary , not recommended if 1 can edit apache conf. secondly, missing header "range" in access-control-allow-headers directive. adding list solved problem.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -