IPアドレスのログを無効にする方法

将来検索する方のために:Discourseインスタンスの前にNGINXを使用でき、X-Real-IPを固定IP 127.0.0.1に設定できます。

  location / {
    proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Real-IP 127.0.0.1;
  }

省略するとエラーが発生し、アプリが起動に失敗します。

Completed 500 Internal Server Error in 149ms (Views: 11.1ms | ActiveRecord: 0.0ms | Allocations: 70970)
PG::InvalidTextRepresentation (ERROR:  invalid input syntax for type inet: "unix:"
LINE 7:     client_ip = 'unix:',
                        ^
)