User app fixes for cors and data origin
This commit is contained in:
@@ -49,7 +49,10 @@ App.ApplicationRoute = Ember.Route.extend
|
||||
else
|
||||
message = t('errors.404.general.message')
|
||||
@transitionTo('index').then (route)->
|
||||
route.get('controller.controllers.application').set 'notice', message
|
||||
route.get('controller.controllers.application').set 'notice', message if route and route.get
|
||||
$log
|
||||
action: 'applicationerror'
|
||||
error: error.message
|
||||
|
||||
scanQr: ->
|
||||
<% if Rails.env.user_app? %>
|
||||
|
||||
@@ -24,8 +24,11 @@ App.ApplicationSerializer = DS.ActiveModelSerializer.extend
|
||||
|
||||
App.ApplicationStore = DS.Store.extend
|
||||
adapter: DS.RESTAdapter.extend
|
||||
host: $data_host
|
||||
namespace: 'user'
|
||||
# user underscored paths
|
||||
pathForType: (type)->
|
||||
decamelized = Ember.String.decamelize(type)
|
||||
Ember.String.pluralize(decamelized)
|
||||
headers:
|
||||
Accept: 'application/json'
|
||||
|
||||
@@ -18,6 +18,7 @@ private
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Request-Method'] = '*'
|
||||
headers['Access-Control-Allow-Headers'] = '*'
|
||||
headers['Access-Control-Allow-Methods'] = '*'
|
||||
end
|
||||
|
||||
def authorize_cmtool
|
||||
|
||||
@@ -7,7 +7,6 @@ html lang="en"
|
||||
title= application_title
|
||||
= javascript_include_tag "vendor/modernizr"
|
||||
= stylesheet_link_tag "user/foundation/application"
|
||||
= javascript_include_tag "user/flat/application"
|
||||
- if Rails.env.user_app?
|
||||
javascript:
|
||||
var QMobile, Qwaiter, Quser;
|
||||
@@ -22,6 +21,7 @@ html lang="en"
|
||||
- else
|
||||
javascript:
|
||||
var QMobile, Qwaiter, Quser;
|
||||
var $data_host = null;
|
||||
var $event_host = '#{Qwaiter.event_host}';
|
||||
var $assets_path = '/assets/';
|
||||
var Qstorage = window.localStorage;
|
||||
@@ -30,5 +30,6 @@ html lang="en"
|
||||
#{user_dynamic_obtain_token_url};
|
||||
var $platform = 'web'
|
||||
var $log = function(params){console.log('App log:'); console.log(params);console.log('=======================================')};
|
||||
= javascript_include_tag "user/flat/application"
|
||||
body
|
||||
#ember-app-container
|
||||
|
||||
Reference in New Issue
Block a user