比如
location /api { add_header "Access-Control-Allow-Origin" "*";
} location ~ [^/]\.php(/|$) { fastcgi_pass unix:/dev/shm/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf;
}这时,如果访问 api 下的.php ,就没有 add_header 了,只能重新写一个正则匹配,非常不优美。请问有好的解决方案么?
哆啦的时光机
慕田峪7331174
随时随地看视频慕课网APP
相关分类