NginxのCORS周りの設定においてリバースプロキシとして使用する場合の情報が少なかったのでメモ。 前提 サーバーの構成はこんな感じ アプリケーションへのリクエストを捌くために、webサーバーとしてNginxを、アプリケーションサーバーとしてPumaを使っている。 アプリケーションサーバーとして何を使うかは関係なくて、とりあえずNginxがプロキシとして動いている場合を想定。 nginxのconfファイル The way nginx and its modules work is determined in the configuration file. By default, the configuration file is named nginx.conf and placed in the directory /usr/local/nginx/conf, /etc/nginx,