lib/jets/middleware/default_stack.rb in jets-3.0.19 vs lib/jets/middleware/default_stack.rb in jets-3.0.20
- old
+ new
@@ -11,10 +11,10 @@
def build_stack
Stack.new do |middleware|
middleware.use Shotgun::Static
middleware.use Rack::Runtime
middleware.use Jets::Controller::Middleware::Cors if cors_enabled?
- middleware.use Rack::MethodOverride # must come before Middleware::Local for multipart post forms to work
+ middleware.use Rack::MethodOverride unless ENV['JETS_RACK_METHOD_OVERRIDE'] == '0' # must come before Middleware::Local for multipart post forms to work
middleware.use Jets::Controller::Middleware::Reloader if Jets.config.hot_reload
middleware.use Jets::Controller::Middleware::Local # mimics AWS Lambda for local server only
middleware.use session_store, session_options
middleware.use Rack::Head
middleware.use Rack::ConditionalGet