<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>buty4649</author_name>
  <author_url>https://blog.hatena.ne.jp/buty4649/</author_url>
  <blog_title>ぶていのログでぶログ</blog_title>
  <blog_url>https://tech.buty4649.net/</blog_url>
  <categories>
    <anon>ngx_mruby</anon>
    <anon>nginx</anon>
    <anon>Ruby</anon>
  </categories>
  <description>ngx_mrubyを使ってNginxを制御するときに、 mruby_set と if を使うことが多いと思います。 例えばiPhoneからのアクセスの場合のみ特定の処理をしたいとします。 その場合以下の様なコード(nginx.conf)になると思います。 mruby_set_code $is_iphone ' hin = Nginx::Headers_in.new # 判定分が雑だけど例題なのでご容赦・・・ /iPhone/ === hin['User-Agent'] '; if($is_iphone) { # iPhoneの時だけ行なう処理 } User-Agent に iPhoneという文…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.buty4649.net%2Fentry%2F2016%2F07%2F31%2F235836&quot; title=&quot;Nginxの真偽値とmruby_setの戻り値について - ぶていのログでぶログ&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>2016-07-31 23:58:36</published>
  <title>Nginxの真偽値とmruby_setの戻り値について</title>
  <type>rich</type>
  <url>https://tech.buty4649.net/entry/2016/07/31/235836</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
