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 +4 -4
- data/lib/kirei/routing/base.rb +3 -1
- data/lib/kirei/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: 804455ef32d0df5db5ae939d4befba9d21061b9f98b2dc1b4056ebcf989ea5db
|
4
|
+
data.tar.gz: 3038b88a8f99c8ee6e5769b05c952151260bc80b477ea9db88ed26b95a0bf310
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a54ffcae9908f895e22ed264e7efcf80f9c8694c75ad98e583f84589187499713958905f21fb86dc336fc11aadafa2ed296e87c754e123fc2c9da8762dbf42d
|
7
|
+
data.tar.gz: 387656485eb61c0963abcdae0079a7894f28923954c2544731e170795767408881d533b820df7d746dab96b54064c66ce618635e0a0b292fb49fa1a05ca84eb2
|
data/lib/kirei/routing/base.rb
CHANGED
@@ -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