Skip to content

Commit

Permalink
Merge pull request #2269 from MSP-Greg/json-require
Browse files Browse the repository at this point in the history
Load JSON at runtime
  • Loading branch information
nateberkopec committed Sep 5, 2020
1 parent a24b51b commit fa54f4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions History.md
Expand Up @@ -6,6 +6,9 @@
* Bugfixes
* Your bugfix goes here (#Github Number)

## 4.3.4/4.3.5 and 3.12.5/3.12.6 / 2020-05-22

Each patchlevel release contains a separate security fix. We recommend simply upgrading to 4.3.5/3.12.6.

## 4.3.3 and 3.12.4 / 2020-02-28
* Bugfixes
Expand Down
6 changes: 4 additions & 2 deletions lib/puma/app/status.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require 'json'

module Puma
module App
# Check out {#call}'s source code to see what actions this web application
Expand All @@ -19,6 +17,10 @@ def call(env)
return rack_response(403, 'Invalid auth token', 'text/plain')
end

if env['PATH_INFO'] =~ /\/(gc-stats|stats|thread-backtraces)$/
require 'json'
end

case env['PATH_INFO']
when /\/stop$/
@cli.stop
Expand Down

0 comments on commit fa54f4d

Please sign in to comment.