infra updates

This commit is contained in:
2020-03-05 11:36:49 -05:00
parent aec5364f2e
commit 840bac4d54
12 changed files with 47 additions and 49 deletions
+6 -13
View File
@@ -249,11 +249,12 @@ module Qwaiter
before :users do
group label: :mozo do # Allow other tools to inject into the mozo menu
title 'Mozo'
resource_link UserFeedback, scope: 'Admin'
resource_link Supplier, scope: 'Admin'
resource_link Section, scope: 'Admin'
resource_link Table, scope: 'Admin'
resource_link SvgElement, scope: 'Admin'
resource_link UserFeedback, scope: :admin
resource_link User, scope: :admin
resource_link Supplier, scope: :admin
resource_link Section, scope: :admin
resource_link Table, scope: :admin
resource_link SvgElement, scope: :admin
engine_link Rails.application, title: 'Go to the website', path: '/'
end
end
@@ -296,14 +297,6 @@ module Qwaiter
end
end
config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'localhost', 'supplier.mozo.local', 'user.mozo.local'
#resource '/user/*', :headers => '*', :methods => '*' #[:get, :post, :options]
resource '*', headers: :any, methods: [:get, :post, :put, :patch, :delete, :options]
end
end
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
+8
View File
@@ -5,6 +5,14 @@ Qwaiter::Application.configure do
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'localhost', 'supplier.mozo.local', 'user.mozo.local', 'events.mozo.local'
#resource '/user/*', :headers => '*', :methods => '*' #[:get, :post, :options]
resource '*', headers: :any, methods: [:get, :post, :put, :patch, :delete, :options]
end
end
# Do not eager load code on boot.
config.eager_load = false
+8
View File
@@ -4,6 +4,14 @@ Qwaiter::Application.configure do
# Code is not reloaded between requests
config.cache_classes = true
config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'localhost', 'supplier.mozo.bar', 'user.mozo.bar', 'events.mozo.bar'
#resource '/user/*', :headers => '*', :methods => '*' #[:get, :post, :options]
resource '*', headers: :any, methods: [:get, :post, :put, :patch, :delete, :options]
end
end
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# and those relying on copy on write to perform better.