lib/jets/controller/middleware/main.rb in jets-2.3.19 vs lib/jets/controller/middleware/main.rb in jets-3.0.0

- old
+ new

@@ -38,10 +38,11 @@ # the Rack::Session::Cookie middleware by default. @controller.session = @env['rack.session'] || {} end def jets_host - default = "#{@env['rack.url_scheme']}://#{@env['HTTP_HOST']}" + protocol = @event.dig('headers', 'X-Forwarded-Proto') || @env['rack.url_scheme'] + default = "#{protocol}://#{@env['HTTP_HOST']}" Jets.config.helpers.host || default end def self.call(env) instance = new(env)