kirei 0.6.0 → 0.6.1

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: 150c91695e10d4bc3fefecf38dfaa5511512aea79c265fdbdb39b3fe2ec9ebba
4
- data.tar.gz: 38d983a823588c9c12a4db38cc7f2885e02a7bd7e602eba0f0f04c0581d399b2
3
+ metadata.gz: 804455ef32d0df5db5ae939d4befba9d21061b9f98b2dc1b4056ebcf989ea5db
4
+ data.tar.gz: 3038b88a8f99c8ee6e5769b05c952151260bc80b477ea9db88ed26b95a0bf310
5
5
  SHA512:
6
- metadata.gz: 072cf7863e6f97b5886ffd4cf0e28d65fda67f23a3beebf967bc2bff7e2776923ac6c07ef42708d69440c91cf4978fff63941e8a5ea6d9c377be9e036613e6ab
7
- data.tar.gz: d776d2a47e7d44d0b78b1c7142ae708a04c843472912e46fa0ba93be08b5877349aaa3e243d34092f7560463fecb06ed4b45a994e0661780c95dacd98422a5f2
6
+ metadata.gz: 3a54ffcae9908f895e22ed264e7efcf80f9c8694c75ad98e583f84589187499713958905f21fb86dc336fc11aadafa2ed296e87c754e123fc2c9da8762dbf42d
7
+ data.tar.gz: 387656485eb61c0963abcdae0079a7894f28923954c2544731e170795767408881d533b820df7d746dab96b54064c66ce618635e0a0b292fb49fa1a05ca84eb2
@@ -162,7 +162,9 @@ module Kirei
162
162
 
163
163
  sig { params(headers: T::Hash[String, String], env: RackEnvType).void }
164
164
  def add_cors_headers(headers, env)
165
- origin = T.cast(env.fetch("HTTP_ORIGIN"), String)
165
+ origin = T.cast(env.fetch("HTTP_ORIGIN", nil), T.nilable(String))
166
+ return if origin.nil?
167
+
166
168
  allowed_origins = Kirei::App.config.allowed_origins
167
169
  return unless allowed_origins.include?(origin)
168
170
 
data/lib/kirei/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Kirei
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kirei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ludwig Reinmiedl