Project

General

Profile

« Previous | Next » 

Revision d8dd4f92

Added by Jon Fautley almost 14 years ago

  • ID d8dd4f92054c1c2d8ee1c8372c44974e1c649836

fixes #238 - Set Content-Type HTTP header when rendering nattended install scripts

View differences:

app/controllers/unattended_controller.rb
before_filter :get_host_details, :allowed_to_install?
before_filter :handle_ca, :except => [:jumpstart_finish, :preseed_finish]
skip_before_filter :require_ssl, :require_login
after_filter :set_content_type, :only => [:kickstart, :preseed, :preseed_finish, :jumpstart_profile, :jumpstart_finish]
def kickstart
logger.info "#{controller_name}: Kickstart host #{@host.name}"
......
render :template => "unattended/#{type}.local" if File.exists?("#{RAILS_ROOT}/app/views/unattended/#{type}.local.rhtml")
end
def set_content_type
response.headers['Content-Type'] = 'text/plain' if @spoof
end
end

Also available in: Unified diff