usps-support 0.2.46 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/routes.rb +11 -4
- data/lib/usps/support/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d7e4b37785b4d1f70b3721aa387bb0101b42fc54965e540ba3ad3f830490d44
|
|
4
|
+
data.tar.gz: 3b804cf40fd405311f71ee157e6eb364019bf464cd49a4ef052e98646b8fba75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1960575ba4e2b6408a7370867f26257de717f4203051f7f5ebb539d324b309c51e555106351e3e21ac1bf145432d7209d742ed8758a30bd068ca1207ac2fa4cb
|
|
7
|
+
data.tar.gz: 3c40989a2707bedf404c19bf0a6f2d3b425f611db081f9f590dbef8e359987927d33a5cf58cde9175b2dffe7a0678b9bc7b080075c4894588ccc401d76801f2a
|
data/config/routes.rb
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
Usps::Support::Engine.routes.draw do
|
|
2
2
|
if defined?(Sidekiq::Web)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
# Gate the Sidekiq dashboard with JWT/admin auth, scoped to THIS engine mount via Rack::Builder.
|
|
4
|
+
# Calling Sidekiq::Web.use(...) instead would mutate the *global* Sidekiq::Web for every app that
|
|
5
|
+
# merely loads the engine — even one that never mounts it — so e.g. a Devise app with its own
|
|
6
|
+
# Sidekiq::Web mount would get wrapped in this JWT gate and lock its admins out. Scoping the
|
|
7
|
+
# middleware to the mounted instance ties the gate to actually mounting the engine.
|
|
8
|
+
sidekiq_dashboard = Rack::Builder.new do
|
|
9
|
+
use Usps::Support::SidekiqAuth
|
|
10
|
+
run Sidekiq::Web
|
|
11
|
+
end.to_app
|
|
12
|
+
|
|
13
|
+
mount sidekiq_dashboard, at: '/sidekiq', as: :sidekiq
|
|
7
14
|
end
|
|
8
15
|
|
|
9
16
|
resource :admin, only: [], controller: 'usps/support/admins' do
|
data/lib/usps/support/version.rb
CHANGED