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:
parent
78ffc8b0a8
commit
54456eef0e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user