1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Bug #1472: Set content type correctly in Ozones

(cherry picked from commit 719047d0a730fc0bc520f8b4619e0d710600aafa)
This commit is contained in:
Hector Sanjuan 2012-09-14 14:52:38 +02:00 committed by Ruben S. Montero
parent 78ffc8b0a8
commit 54456eef0e

View File

@ -191,6 +191,7 @@ end
before do
cache_control :no_store
content_type 'application/json', :charset => 'utf-8'
unless request.path=='/login' || request.path=='/'
unless authorized?
@ -224,6 +225,7 @@ end
# HTML Requests
##############################################################################
get '/' do
content_type 'text/html', :charset => 'utf-8'
return File.read(File.dirname(__FILE__)+
'/templates/login.html') unless authorized?
@ -236,6 +238,7 @@ get '/' do
end
get '/login' do
content_type 'text/html', :charset => 'utf-8'
File.read(File.dirname(__FILE__)+'/templates/login.html')
end
@ -253,9 +256,9 @@ end
##############################################################################
# Config and Logs
##############################################################################
get '/config' do
config
end
# get '/config' do
# config
# end
##############################################################################
# GET information