File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ class Application < Rails::Application
2626 config . middleware . use ActionDispatch ::Flash
2727
2828 config . autoload_paths << Rails . root . join ( 'lib' )
29- config . autoload_paths << Rails . root . join ( 'app/middleware' )
3029 config . eager_load_paths << Rails . root . join ( 'lib' )
31- config . eager_load_paths << Rails . root . join ( 'app/middleware' )
30+
31+ if Rails . env . production?
32+ require Rails . root . join ( 'app/middleware/json_subdomain_redirector' )
33+ config . middleware . use ::JsonSubdomainRedirector
34+ end
3235 end
3336end
Original file line number Diff line number Diff line change 145145 # API Configuration
146146 config . api_only = ENV [ 'RAILS_SEQCODE_API_ONLY' ] . present?
147147 config . api_server = 'https://api.seqco.de/v1'
148- config . middleware . use 'JsonSubdomainRedirector'
149148end
You can’t perform that action at this time.
0 commit comments