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 Sunstone

(cherry picked from commit 128e5c210ebc112f6886a385bba7d3213e14f8f5)
This commit is contained in:
Hector Sanjuan 2012-09-14 14:52:18 +02:00 committed by Ruben S. Montero
parent 6f332c5e74
commit 78ffc8b0a8

View File

@ -183,6 +183,7 @@ end
before do
cache_control :no_store
content_type 'application/json', :charset => 'utf-8'
unless request.path=='/login' || request.path=='/'
halt 401 unless authorized?
@ -218,6 +219,7 @@ end
# HTML Requests
##############################################################################
get '/' do
content_type 'text/html', :charset => 'utf-8'
if !authorized?
return erb :login
end
@ -239,6 +241,7 @@ get '/' do
end
get '/login' do
content_type 'text/html', :charset => 'utf-8'
if !authorized?
erb :login
end
@ -290,6 +293,7 @@ post '/config' do
when "wss" then session[:wss] = value
end
end
[204,""]
end
get '/vm/:id/log' do