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

Popular posts from this blog

'hasOwnProperty' in javascript -

Command prompt result in label. Python 2.7 -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -