Rack middleware: Sets response headers based on matching URL conditions