コメントありがとうございます。 申し訳ございません。 10年近い前の記事と言うこ…
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;
}
}
}
検索

コメントを残す