Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl>
This commit is contained in:
parent
d73f52e73c
commit
60a5963828
|
|
@ -3,7 +3,7 @@ class ApplicationController < ActionController::Base
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
before_action :set_locale
|
before_action :set_locale
|
||||||
layout :layout_by_resource
|
layout :layout_by_resource
|
||||||
after_filter :set_headers
|
after_action :set_headers
|
||||||
|
|
||||||
def set_locale
|
def set_locale
|
||||||
I18n.locale = params[:lang] || I18n.default_locale
|
I18n.locale = params[:lang] || I18n.default_locale
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ module InvoiceKeeper
|
||||||
# -- all .rb files in that directory are automatically loaded.
|
# -- all .rb files in that directory are automatically loaded.
|
||||||
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
|
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
|
||||||
config.i18n.default_locale = :pl
|
config.i18n.default_locale = :pl
|
||||||
|
config.action_dispatch.default_headers.merge!({'X-Frame-Options' => 'ALLOWALL'})
|
||||||
config.middleware.insert_before 0, Rack::Cors do
|
config.middleware.insert_before 0, Rack::Cors do
|
||||||
allow do
|
allow do
|
||||||
origins '*'
|
origins '*'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue