Apache .htaccess: CORS * on localhost only -
i have 2 projects, 1 php web api following .htaccess
:
header add access-control-allow-origin "http://app.domain.com" header add access-control-allow-headers "origin, x-requested-with, content-type" header add access-control-allow-methods "put, get, post, delete, options" header set access-control-allow-credentials true rewriteengine on rewritecond %{script_filename} !-f rewritecond %{script_filename} !-d rewritecond %{script_filename} !-l rewriterule ^(.*)$ index.php/$1
note access-control-allow-origin
header contains base url of second project (an angularjs application).
this work, i'd change origin *
if both projects being run on localhost, every developer within project can test changes without deploying first.
how can achieve this?
we not want use separate .htaccess
local tests. prefer use single one.
Comments
Post a Comment