A route to serve static assets (like .jpgs, etc?)

前端 未结 5 1368
后悔当初
后悔当初 2021-02-02 16:19

I\'ve worked my way through a number of interesting routing problems - turning a request URL into a hash, etc., but just out of curiosity, is there a way to tell the routing sys

5条回答
  •  眼角桃花
    2021-02-02 16:35

    Caveat: if your request URL matches a static resource WEBrick, mongrel or whatever will happily serve it. At any cost, you don't want this in production: if your traffic is high enough your app will be brought to its knees just because its mongrels will be busy serving static content.

    So make sure that your web server is properly configured for all kinds of static content as the previous commenters have pointed out.

提交回复
热议问题