jam-cloud/web/app/controllers/api_configs_controller.rb

25 lines
471 B
Ruby

class ApiConfigsController < ApiController
respond_to :json
def index
configs =
{
websocket_gateway_uri: APP_CONFIG.websocket_gateway_uri,
websocket_gateway_uri_ssl: APP_CONFIG.websocket_gateway_uri_ssl
}
render :json => configs, :status => 200
end
# should be nginx cached on 5 minutes
def client
configs =
{
top_message: GenericState.top_message
}
render :json => configs, :status => 200
end
end