nxt_support 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea9c53b87505a7b31250e050d6b4e4adb3c0504f520e5f552a484a1a450b551c
4
- data.tar.gz: 97ae0e288c2ad44fc9ab163917f12d159a3ac3810c086ad7e65dcc4c5325e5c1
3
+ metadata.gz: 7328933d44f33869979bcb80db3226e80e5222f584e77f6da99334fedf24e201
4
+ data.tar.gz: 0bfb17e61361492c71f740669bf1a9ed5328c590f3063f47801111b2c4a38061
5
5
  SHA512:
6
- metadata.gz: e16ed8f33f905dcd5825d2272900174eae43b96595d73f5abf8c153899d0438c88c22473eb158253f2f87d4d7934467a50e465686ad99927b33e5456c9aeb5d8
7
- data.tar.gz: 8207471f7c5380671c1ff643cf32d438e30d79b8e5c674eaaa2df0688f63e224f3f4b2ba7229cc6473ec743deef0a88ca15d69374e33017f4071dcdb11a711ee
6
+ metadata.gz: 19f986e57851b612d9efc5e67bc49d29d53f081d460b2100db1675e296b4af9f9f675c0c9daac432b516d3292a7f857359b9f520a4cbe4366e0b4eafef7e3598
7
+ data.tar.gz: 33b75c6b866e473b5e8eae0f7456641896d80c195b0498b2a286f013d0a4391494aa26772bc71557b6be1e84d854b22820737b25700079b21380bdf712639c95
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .idea/
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.4.2 2022-12-19
2
+ - `Sentry-Error-Id`: Set `Access-Control-Expose-Headers` so frontend can access header
3
+
1
4
  # v0.4.1 2022-11-18
2
5
  - Rename header to `Sentry-Error-Id` for consistency
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_support (0.4.1)
4
+ nxt_support (0.4.2)
5
5
  activerecord
6
6
  activesupport
7
7
  nxt_init
@@ -8,7 +8,9 @@ module NxtSupport
8
8
  def call(env)
9
9
  status, headers, body = @app.call(env)
10
10
  if status >= 500 && env['sentry.error_event_id']
11
- headers["Sentry-Error-Id"] = env['sentry.error_event_id']
11
+ headers['Sentry-Error-Id'] = env['sentry.error_event_id']
12
+ exposed_headers = headers['Access-Control-Expose-Headers'] || headers['access-control-expose-headers']
13
+ headers['Access-Control-Expose-Headers'] = [exposed_headers, 'Sentry-Error-Id'].compact.join(', ')
12
14
  end
13
15
  [status, headers, body]
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module NxtSupport
2
- VERSION = "0.4.1".freeze
2
+ VERSION = "0.4.2".freeze
3
3
  end
data/lib/nxt_support.rb CHANGED
@@ -8,7 +8,9 @@ require "nxt_support/serializers"
8
8
  require "nxt_support/util"
9
9
  require "nxt_support/services"
10
10
  require "nxt_support/refinements"
11
- require "nxt_support/middleware"
11
+
12
+ require 'nxt_support/middleware/sentry_error_id'
13
+
12
14
 
13
15
  module NxtSupport
14
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nils Sommer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-11-21 00:00:00.000000000 Z
14
+ date: 2022-12-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord
@@ -165,7 +165,6 @@ files:
165
165
  - bin/rspec
166
166
  - bin/setup
167
167
  - lib/nxt_support.rb
168
- - lib/nxt_support/middleware.rb
169
168
  - lib/nxt_support/middleware/sentry_error_id.rb
170
169
  - lib/nxt_support/models.rb
171
170
  - lib/nxt_support/models/assignable_values.rb
@@ -1 +0,0 @@
1
- require_relative 'middleware/sentry_error_id'