lib/orange/middleware/static.rb in orange-0.0.5 vs lib/orange/middleware/static.rb in orange-0.0.6

- old
+ new

@@ -38,11 +38,11 @@ core.add_static('_orange_', File.join(core.core_dir, 'assets')) @app = app @core = core @libs = options[:libs] || [Orange::Core] - @urls = options[:urls] || ["/favicon.ico", "/assets/public"] + @urls = options[:urls] || ["/favicon.ico", "/assets/public", "/assets/uploaded"] @root = options[:root] || File.join(orange.app_dir, 'assets') @lib_urls = core.statics @file_server = Orange::Middleware::StaticFile.new(@root) end @@ -54,10 +54,10 @@ lib_url = can_serve_lib.first packet['file.root'] = can_serve_lib.last packet['route.path'] = path.split(lib_url, 2).last @file_server.call(packet.env) elsif can_serve - packet['route.path'] = path + packet['route.path'] = path.gsub(/^\/assets/, '') @file_server.call(packet.env) else pass packet end end \ No newline at end of file