Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
rack-protection ã¨ã¯ï¼Sinatra é¢é£ã®ã³ã³ãã¼ãã³ã (sinatra-contrib ãªã©) ãå¤æ°ä½ã£ã¦ã rkh æ°ã®ãããã¯ãã®ä¸ã¤ã§ï¼Rack ã«çµã¿è¾¼ãã ãã§ããã¤ãã®èå¼±æ§ã«å¯¾ããé²å¾¡ããã¦ããã Rack middleware ã§ãã ãããããªã¨æãã³ã³ãã¼ãã³ããããã¾ããï¼åºæ¬çã«ããããã®ã¯ããã©ã«ãã§ç¡å¹åããã¦ã¾ããï¼FrameOptions ã XSSHeader ã®ããã«ãã¨ããããå ¥ãã¨ãã¦ãå¯ä½ç¨ãªããå®å¹æ§ããããã³ã³ãã¼ãã³ããå¤ãã®ã§ï¼ã¨ããããããã¨ãã¨ããã¹ã¿ã³ã¹ã§ãããã®ã§ã¯ãªãã§ããããã 使ãæ¹ ãã£ããã¨çç¥ã ã¨ãããã説æãã¼ã¸ã«ããããã«ï¼config.ru ã«æ¸ãå ´åï¼ ãªæãã§ä½¿ããã¨ã«ãªãã¾ãããã® Rack::Protection ã use ããã¨ï¼ãã³ãã«ããã¦ããã³ã³ãã¼ãã³ã (middlew
[Video] http://www.youtube.com/watch?v=LWyEWUD-ztQ Discourseã¯ãStackoverflowã®Founderã§ãããããã°Coding Horrorã§ç¥ãããJeff Atwoodã®æ°ããããã¸ã§ã¯ãã§ãã.NETãã¼ã¹ã®Stackoverflowãã¤ãã£ãJeffãã¯ããã¦Rubyã®ã«ã³ãã¡ã¬ã³ã¹ã«ç»å ´ã§ããåé ã®ï¼åã ãåºæ¼ãã¦ãã¦ãç¸å¤ãããé¢ç½ãå 容ã§ãããã¡ãã£ã¨æåã«ããã®ãã¯ã°ããããå 容ãããã®ã§ãVideoã®æ¹ãã覧ãã ããã Jeffã«ç¶ãã¦ãSam Saffron (åããStackoverflow -> Discourse) ããRubyãã¼ã¹ã®ãã£ã¹ã«ãã·ã§ã³ãã©ã¼ã©ã ã®ãªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ãã§ããDiscourseã§ã®å®ä¾ããã¨ã«ãã¨ã³ã¸ãã¢ã¯ã¢ããªã®ããã©ã¼ãã³ã¹ãã¥ã¼ãã³ã°ã«ãã£ã¨æ³¨åãããã¨èªã£
ãã®ã¦ã§ããµã¤ãã¯è²©å£²ç¨ã§ãï¼ monoweb.info ã¯ãããªãããæ¢ãã®æ å ±ã®å ¨ã¦ã®ææ°ãã¤æé©ãªã½ã¼ã¹ã§ããä¸è¬ãããã¯ããããããæ¤ç´¢ã§ããå 容ã¯ãmonoweb.infoãå ¨ã¦ã¨ãªãã¾ããããªãããæ¢ãã®å 容ãè¦ã¤ãããã¨ãé¡ã£ã¦ãã¾ãï¼
ãã¨ã©ã¼ã¡ãã»ã¼ã¸ããå¦ã¶Rackæåã®ä¸æ©ãããã³ãã¨ã©ã¼ã¡ãã»ã¼ã¸ããå¦ã¶Rack - Middlewareã®éæ³ãã®ç¶ãã§ãã åï¼æ¬ã®è¨äºã§ãRackã¯rackupã³ãã³ããèµ·åããã¨ãdefaultã§config.ruãèªã¿è¾¼ã¿Webãµã¼ããèµ·åããã¨ãããã¨ãåããã¾ãããã¾ããconfig.ruã®ä¸ã§useã使ã£ã¦middlewareãæå®ããã¨ãWebã¢ããªãã©ãããã¦å å´ããå¤å´ã«åãã¦ãããã®#callãé 次å¼ã³åºãã¨ãããã¨ãåããã¾ãããã¡ãªã¿ã«åã¯ãã®å¼ã³åºãã¹ã¿ã¤ã«ãä»å¾ããããªã§ã¼ã·ã«å¼ã³åºããã¨å¼ã¶ãã¨ã«ãã¾ããã ããã§ï¼ç¹æ°ã«ãªããã¨ãããã¾ããconfig.ruã¯Rubyã¹ã¯ãªããã§ããrackupã³ãã³ãã®å®è¡ããRackã¯ã©ããã£ã¦ãã®ãã¡ã¤ã«ãå®è¡ãã¦ããã®ã§ãããããã¾ãç°¡åã«æ³åã¯ã¤ãã¾ããï¼ã¨ããã»ã©ã§ã¯ãªãï¼ããããï¼ç¹ç®ã§ããããï¼ç¹ã¯
ååã®è¨äºãã¨ã©ã¼ã¡ãã»ã¼ã¸ããå¦ã¶Rack - æåã®ä¸æ©ãã®ç¶ãã§ãã åã«ããã¨Rackã«ã¯Middlewareãªãéæ³ãããããã§ããããã¦Rackå¤ææ¸ã«ã¯Middlewareã«ã¤ãã¦æ¬¡ã®ããã«ããã¾ãã useã®åªæãå±ããããããã°æã¯éããã æºå ååä½ã£ãããªãã¡ãã£ã¦Webãã¬ã¼ã ã¯ã¼ã¯ãdraqueããç¶ç¶ãã¦ä½¿ãã¾ããconfig.ruãå°ãé·ããªã£ãã®ã§ãWebã¢ããªã®æ¬ä½ãå¥ãã¡ã¤ã«draque.rbã«ç§»ãã¾ãã #draque.rb module Draque @@routes = { get:{} } def draque(env) path = env['PATH_INFO'] if res = @@routes[:get][path] res.call(env) else [ 404, headers, not_found ] end end def
Rack 2.0, or Rack for the Future Hi all, As most of you know, I've bene essentially maintaining Rack for the last year or so. During this time, and for a long time before I've been paying close attention to what is working well, and what could do with a change. Preamble After a lot of discussion between myself and many community members involved in the framework and web server space (essentially r
Rails 4ã§Sinatra::Streamingç¸å½ã®ã¹ããªã¼ãã³ã°æ©æ§ãå ¥ãã¨ã®ãã¨ã§ãããããããRackãEventMachineã«å¯ãæ·»ã£ãã¹ããªã¼ãã³ã°ã¯çæªã¨ãããå¼·å¼ãããã¨èãã¦ãã¦(Phusionã®äººã®æ¸å¿µã«è¿ã)ããããªãæåããåãã¦ããã¯ããã¸ã¼ã使ã£ãã»ããããããã¨æãNode.jsã触ããã¨ã«ãã¾ããã ã¨ãã£ã¦ãã¹ããªã¼ãã³ã°ã®ããã ãã«ãã¹ã¦ãNodeã§æ¸ãæ°ã¯ãªãã¦ãã¡ã¤ã³é¨åãSinatraãRailsã§å¦çããã¹ããªã¼ãã³ã°é¨åï¼EventSourceãWebSocketããããã¯Socket.IOã«ä¸¸æãï¼ãNodeã§å¦çãããã®2ã¤ãZeroMQããªããã§ããã»ã¹ééä¿¡ããã®ãçæ³ããªã¨æã£ã¦ãã¾ããã¤ã¾ãã¯ã©ã¤ã¢ã³ãï¼ãã©ã¦ã¶ï¼ã¯ã¾ãRailsã«æ¥ç¶ããããã§new EventSource('http://host:8080/sse')ã¿ã
Our Services Think Big. For as long as we can remember, weâve defied expectations and embraced the insurmountable, and weâre still just getting warmed up. So bring us the impossible, and letâs leave the simple to everyone else. Youâll find us out front polishing the corners of the bleeding edge. Learn more Large Scale Web & CMS Large Scale Web & CMS. As a Drupal partner with demonstrated success w
ãªãã twitter ã§ãããã声ããã£ãã®ã§ãã£ãã試ãããã Rack::URLMap ã使ã ãªãã¨ï¼ Rack::URLMap ã¯ã env["PATH_INFO"] ããããªã«ãã¦ã¯ããã¾ããã/sub ãµããã£ã¬ã¯ããªã«ãã¦ã³ãããã¢ããªã±ï½ã·ã§ã³ã«ãã /sub ãä»ããã¾ã¾æ¸¡ãã¾ãããªã®ã§ãèªåã§åé¤ãã Rack Middleware æ¸ããã£ãã app1.rb: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 require 'rubygems' require 'bundler/setup' Bundler.require class SubApp < Sinatra::Base
Resources Rack rack-contrib Full Episode Source Code Special thanks to Josh Peek for answering some questions I had on this topic. Update: making the code below thread safe by duplicating self on call. Note: as wldock and remi pointed out in the comments, it is important to change the headers["Content-Length"] value to reflect the new body length. See their comments for details.
ãã®ã¦ã§ããµã¤ãã¯è²©å£²ç¨ã§ãï¼ monoweb.info ã¯ãããªãããæ¢ãã®æ å ±ã®å ¨ã¦ã®ææ°ãã¤æé©ãªã½ã¼ã¹ã§ããä¸è¬ãããã¯ããããããæ¤ç´¢ã§ããå 容ã¯ãmonoweb.infoãå ¨ã¦ã¨ãªãã¾ããããªãããæ¢ãã®å 容ãè¦ã¤ãããã¨ãé¡ã£ã¦ãã¾ãï¼
Rackã®åãã«ã¤ãã¦ã³ã¼ãã追ã£ã¦ã¿ãã Rackã®ãã¼ã¸ã§ã³ã¯1.4.1ã§ãã Rackã®åãã®åã«ãã¾ãã¯ãã£ããRackã§åããã£ã¦ããã®ã確èªãã¦ã¿ããã rack up! ã¾ãã¯é©å½ã«Rackã®è¨å®ãã¡ã¤ã«å ¼ã¯ã©ã¹ãå®ç¾©ãã require 'rack' require 'pp' class Sample def call(env) pp env [200, {"Content-Type" => "text/plain"}, ["rack up!\n"]] end end run Sample.new ããã rack up ãã sugamasao@GRAM% rackup sample.ru [2012-02-13 23:35:44] INFO WEBrick 1.3.1 [2012-02-13 23:35:44] INFO ruby 1.9.3 (2011-11-30)
ã¯ã¦ãªã¾ã¨ã(ä»®)ã¯2012å¹´10æ1æ¥ã«çµäºãã¾ãã 2012å¹´8æ31æ¥ã«ãç¥ããããã¦ããã ããéãããã¯ã¦ãªã¾ã¨ãï¼ä»®ï¼ãã2012å¹´10æ1æ¥ã«ãçµäºããã¦ããã ãã¾ããããæ顧ãããã¨ããããã¾ããã æ¢åã¾ã¨ãã®ç·¨éãããã±ããã¯æ©è½ãåæ¢ããã¦ããã ãã¾ãããããã¾ã§ã¦ã¼ã¶ã¼æ§ã«ä½æãã¦ããã ããã¾ã¨ãã¯ã以ä¸ã®ãã¾ã¨ãä¸è¦§ãããé²è¦§ã§ãã¾ãã ã¯ã¦ãªã¯ããããããæ¢åãµã¼ãã¹ã®ä¸å±¤ã®çºå±ã¨ãæ°ãããµã¼ãã¹ã®æé·ã«ãå ¨åãå°½ããã¦ã¾ããã¾ããä»å¾ãã¯ã¦ãªããããããé¡ããããã¾ãã
Ruby on Railsã®çã¿ã®è¦ªãDHHãå¨ç±ãã37signalsãMac OS Xç¨ã®Rackãµã¼ããPowãããªã¼ãã³ã½ã¼ã¹ã§å ¬éãã¾ãããã¡ãã£ã¨ããã¾ã§ã«ãªã種é¡ã®ãããã¯ãã§ããã®ä½¿ãåæã®ã·ã³ãã«ãã¨ã¢ã¤ãã¢ã«é¼»è¡ãåºããã«ãªãã¾ãããå®è£ ã«Node.jsã¨CoffeeScriptã使ã£ã¦ããã¨ããã®ãé¢ç½ãã§ãã Powã®å£²ãã¯ããZero-configurationãï¼è¨å®è¦ããï¼ã¨ãããã¨ã§ãè¤æ°ã®Rails/Sinatraã¢ããªããã¼ã«ã«ã§åããã¦éçºãããããªã¨ãã«ãä»®æ³çãªãã¡ã¤ã³åãæ軽ã«å²ãå½ã¦ã¦ã¢ã¯ã»ã¹ã§ããããã«ãã¦ããããã¨ãããã®ã§ããã¤ã³ã¹ãã¼ã«ã¯curlã®ã³ãã³ãä¸çºã§ã $ curl get.pow.cx | sh ã¨ããã ããããã¦ãRailsãSinatraãªã©ã®Rackã¢ããªã®ãã£ã¬ã¯ããªãPowã®ãã£ã¬ã¯ããªã«ã·ã³ããªãã¯ãªã³ã¯ãè²¼ã
CUI 㪠Git ãã©ã¦ã¶ tig ãå ¥ãã¦ã¿ã (Born Too Late) [git][scm][tig] tig ã使ã£ã¦ã¿ã (do_akiã®å¾ç¶æ³è¨) Twitter Trackbacks () ã¨ã¹ã¨ã¹å¤ç¥ã2010é»è¨é¨ã«åå ãã #tobesetu (key-cc) EC-CUBE LC_Page::sendRedirect()ã«å¼æ°ã渡ããªã (å¼±å°PHPerã®æ鬱) [densetu][åå¼·ä¼][å¦æ ¡]é»è¨é¨ITåå¼·ä¼#3ããã¾ããï¼éæè¿½è¨ (å¦å ITåå¼·ä¼ã®ã¹ã¹ã¡ - atcorp) é»è¨é¨ITåå¼·ä¼#3ã«åå ããã£ï¼ (Curious) GLT #24 ï¼æ親ä¼ï¼ã«ä¹±å ¥ãã¦ããï¼ (Curious) GLT (Genesis Lightning Talks) Vol.24ã«åå ãã¾ãã (key-cc) GLT (Genesis Lightning Talks
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}