forest_admin_rails 1.38.3 → 1.39.0
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/lib/forest_admin_rails/engine.rb +23 -1
- data/lib/forest_admin_rails/version.rb +1 -1
- data/lib/forest_admin_rails.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe017cbbf141336641a4e5f66f021847c8661488287db1beab964580c3c0d4ba
|
|
4
|
+
data.tar.gz: e4f542012d6d98544c9a1fc75a12a44de07883f1551eb18dc8743cfa1b3b5a65
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b10ddc9ea4acd4087c6ebea7e30d9ab7667eb68034d98b0ed7295257c22a14736e7bac3bce9e18a2989b772b72587b7af7e4993c7a1357c761513735b5ed871a
|
|
7
|
+
data.tar.gz: ff99052059e50e2792098179bed5379d0ad0899e4fad6280982de0aa9ecd0dd291ca10f8e726371fcdcbe667c0146470fe7728ac2ec4d0432a955854aeb0535e
|
|
@@ -34,6 +34,27 @@ module ForestAdminRails
|
|
|
34
34
|
agent_factory.setup(ForestAdminRails.config)
|
|
35
35
|
load_configuration
|
|
36
36
|
load_cors
|
|
37
|
+
load_correlation_id
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Echo the agent-generated correlation id on every response (mirrors the Node agent's
|
|
42
|
+
# router.use(correlationIdMiddleware)); CORS exposure of the header is handled in load_cors.
|
|
43
|
+
#
|
|
44
|
+
# Ahead of ShowExceptions rather than at the end of the stack: a Rack middleware can only add a header
|
|
45
|
+
# to a response it sees returned, so sitting under the exception handlers meant error responses they
|
|
46
|
+
# build on the way out never carried the id.
|
|
47
|
+
def load_correlation_id
|
|
48
|
+
middleware = ForestAdminAgent::Http::CorrelationIdMiddleware
|
|
49
|
+
|
|
50
|
+
begin
|
|
51
|
+
# The application's stack, not the engine's: ShowExceptions lives there, and an
|
|
52
|
+
# insert_before recorded on the engine's own (empty) proxy raises when it is applied.
|
|
53
|
+
Rails.application.config.middleware.insert_before ActionDispatch::ShowExceptions, middleware
|
|
54
|
+
rescue StandardError
|
|
55
|
+
# No ShowExceptions in this stack (or already gone): the id still reaches every response the app
|
|
56
|
+
# returns normally.
|
|
57
|
+
config.middleware.use middleware
|
|
37
58
|
end
|
|
38
59
|
end
|
|
39
60
|
|
|
@@ -102,7 +123,8 @@ module ForestAdminRails
|
|
|
102
123
|
hostnames += ENV['CORS_ORIGINS'].split(',') if ENV['CORS_ORIGINS']
|
|
103
124
|
|
|
104
125
|
origins hostnames
|
|
105
|
-
resource '*', headers: :any, methods: :any, credentials: true, max_age: 86_400
|
|
126
|
+
resource '*', headers: :any, methods: :any, credentials: true, max_age: 86_400,
|
|
127
|
+
expose: [ForestAdminAgent::Http::CorrelationId::HEADER]
|
|
106
128
|
end
|
|
107
129
|
end
|
|
108
130
|
end
|
data/lib/forest_admin_rails.rb
CHANGED
|
@@ -34,6 +34,9 @@ module ForestAdminRails
|
|
|
34
34
|
setting :disable_route_cache, default: false
|
|
35
35
|
setting :rpc_max_polling_threads, default: nil
|
|
36
36
|
setting :workflow_executor_url, default: nil
|
|
37
|
+
# { database: <ActiveRecord config or URL>, schema:, table_name:, redact: } — setting `database`
|
|
38
|
+
# turns the audit trail on: every change is captured and the `/_audit-trail` routes are registered.
|
|
39
|
+
setting :audit_trail, default: nil
|
|
37
40
|
|
|
38
41
|
if defined?(Rails::Railtie)
|
|
39
42
|
# logic for cors middleware,... here // or it might be into Engine
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_admin_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.39.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthieu
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-08-
|
|
12
|
+
date: 2026-08-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: base64
|