<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>spitfire_tree</author_name>
  <author_url>https://blog.hatena.ne.jp/spitfire_tree/</author_url>
  <blog_title>happy lie, happy life</blog_title>
  <blog_url>https://spitfire-tree.hatenadiary.org/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>表題の通り Rails 3.2.X 系の request.remote_ip に入っている値について調べました。 最初に結論 リクエストヘッダを読み HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR の順にセットされていた値を取得してきます。 ソースコード http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp/GetIp.html上記 API にも記載されていますが calculate_ip が該当のメソッドです。 # File actionpack/lib/action_disp…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fspitfire-tree.hatenadiary.org%2Fentry%2F20130612%2F1371006354&quot; title=&quot;Rails の request.remote_ip には何の値が入っているのか - happy lie, happy life&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-06-12 12:05:54</published>
  <title>Rails の request.remote_ip には何の値が入っているのか</title>
  <type>rich</type>
  <url>https://spitfire-tree.hatenadiary.org/entry/20130612/1371006354</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
