{"version":"1.0","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.buty4649.net%2Fentry%2F2016%2F07%2F31%2F235836\" title=\"Nginx\u306e\u771f\u507d\u5024\u3068mruby_set\u306e\u623b\u308a\u5024\u306b\u3064\u3044\u3066 - \u3076\u3066\u3044\u306e\u30ed\u30b0\u3067\u3076\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"author_name":"buty4649","url":"https://tech.buty4649.net/entry/2016/07/31/235836","blog_url":"https://tech.buty4649.net/","type":"rich","author_url":"https://blog.hatena.ne.jp/buty4649/","height":"190","description":"ngx_mruby\u3092\u4f7f\u3063\u3066Nginx\u3092\u5236\u5fa1\u3059\u308b\u3068\u304d\u306b\u3001 mruby_set \u3068 if \u3092\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070iPhone\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u306e\u5834\u5408\u306e\u307f\u7279\u5b9a\u306e\u51e6\u7406\u3092\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u4ee5\u4e0b\u306e\u69d8\u306a\u30b3\u30fc\u30c9(nginx.conf)\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002 mruby_set_code $is_iphone ' hin = Nginx::Headers_in.new # \u5224\u5b9a\u5206\u304c\u96d1\u3060\u3051\u3069\u4f8b\u984c\u306a\u306e\u3067\u3054\u5bb9\u8d66\u30fb\u30fb\u30fb /iPhone/ === hin['User-Agent'] '; if($is_iphone) { # iPhone\u306e\u6642\u3060\u3051\u884c\u306a\u3046\u51e6\u7406 } User-Agent \u306b iPhone\u3068\u3044\u3046\u6587\u2026","provider_url":"https://hatena.blog","blog_title":"\u3076\u3066\u3044\u306e\u30ed\u30b0\u3067\u3076\u30ed\u30b0","published":"2016-07-31 23:58:36","categories":["ngx_mruby","nginx","Ruby"],"width":"100%","title":"Nginx\u306e\u771f\u507d\u5024\u3068mruby_set\u306e\u623b\u308a\u5024\u306b\u3064\u3044\u3066"}