apicasso 0.4.8 → 0.4.9
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/app/controllers/apicasso/application_controller.rb +5 -1
- data/lib/apicasso/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: 3546484905f1ef3c02adbfbdbf03e00ba32986b3424226ea92f749af82f863b0
|
|
4
|
+
data.tar.gz: b0522514a3ce287bc71bbe2543cfc327a286346df29f52768d07853ae1d357da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3bdae43c1597ed688f7d41794ee06b98a8b71bbdb4fcaa55bb8cdbb42dabe938501ca107ca34ce3a10c10b30104a2ae8e4e38f0f219d3eff4d51e7ff0998be5e
|
|
7
|
+
data.tar.gz: 59e569b3589a918ded54f5ceb4759b8b55a86f7a3287666163c22ab40c53d1644758d5d516c325be200c0e52b2280ed48734f7c12dd82c5ae9ab52556ce3870d
|
|
@@ -163,7 +163,11 @@ module Apicasso
|
|
|
163
163
|
|
|
164
164
|
# A method to allow origin customizing through method overriding
|
|
165
165
|
def allow_origin
|
|
166
|
-
|
|
166
|
+
if request.headers['Referer'].present?
|
|
167
|
+
request.protocol + URI(request.headers['Referer']).host
|
|
168
|
+
else
|
|
169
|
+
request.headers['Origin'] || '*'
|
|
170
|
+
end
|
|
167
171
|
end
|
|
168
172
|
|
|
169
173
|
# Checks if current request is a CORS preflight check
|
data/lib/apicasso/version.rb
CHANGED