class Letsencrypt::Middleware
Public Class Methods
new(app)
click to toggle source
# File lib/letsencrypt-rails-heroku/middleware.rb, line 4 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/letsencrypt-rails-heroku/middleware.rb, line 8 def call(env) if Letsencrypt.challenge_configured? && env["PATH_INFO"] == "/#{Letsencrypt.configuration.acme_challenge_filename}" return [200, {"Content-Type" => "text/plain"}, [Letsencrypt.configuration.acme_challenge_file_content]] end @app.call(env) end