Sha256: 3d38183ca41602b89bf47695afb30ccb145ff205f62aee1c0e5565caf32ea19f

Contents?: true

Size: 391 Bytes

Versions: 2

Compression:

Stored size: 391 Bytes

Contents

class EarlyHints
	def initialize(app)
		@app = app
	end
	
	def call(env)
		if env['PATH_INFO'] == "/index.html" and early_hints = env['rack.early_hints']
			early_hints.push("/style.css")
			early_hints.push("/script.js")
		end
		
		@app.call(env)
	end
end

use EarlyHints
use Rack::Static, :urls => [""], :root => __dir__, :index => 'index.html'
run lambda{|env| [404, [], ["Not Found"]]}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
falcon-0.25.0 examples/push/config.ru
falcon-0.24.0 examples/push/config.ru