なぜか質問を投稿すると反映されない。。 何かしら問題があってはじかれている??
nginxでCORS
nginx.conのパスが/usr/local/nginx/conf/nginx.confの場合。
$ sudo vi /usr/local/nginx/conf/nginx.conf
http{
server{
location / {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods "POST, GET, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Authorization, Accept";
add_header Access-Control-Allow-Credentials true;
}
}
}
検索

コメントを残す