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,
![Nginxをリバースプロキシで使う場合のCORS設定 - 箱のプログラミング日記。](https://cdn-ak-scissors.b.st-hatena.com/image/square/13ca27d69d2017307009c4088ced323ba54d5760/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fy%2Fy_hakoiri%2F20191102%2F20191102121915.jpg)