stellar_federation-rails 0.2.1 → 0.2.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: ecc4193c8f6e90947bea679d94937d89157f7668e7821993afb5d8c55c995c7a
4
- data.tar.gz: 2ac13719436f6723cd241349c36ae2076f7667313cdf6e2029e56709bbf8efd0
3
+ metadata.gz: 9b07fc81960b962583f800de00476b422ffd7af83e1399c6fd45d924cd04a612
4
+ data.tar.gz: e97febc55d33d9955dfd50249e255ef4476e45a37e39675d56fe28b57fe76104
5
5
  SHA512:
6
- metadata.gz: 84e08b2c6474f8cce54f1dad5ab20aefb782adf74b689b994840cfa02839820e5f00b86cf57bf6987aaef0ea84189c9b1a1c3720e58e94b1386d5714fcd587fc
7
- data.tar.gz: c1f597fd7b8222dd43eaf7ca99b81d72352d4f4e10e2c09efb66c9c6bdadec96fe320bb7433b98f2d7117caa6c3185a3512cc51de2775f8614721794cd17d4f8
6
+ metadata.gz: 0ed55ed90a65fb031392a038bf5f415b5bda0f1b7b47f35312e2ae0d0e1923c11a330bb2f2b4b17579e5ec65911327b7b9c416db1a548c42d33b3dbaf408fd5f
7
+ data.tar.gz: f66ec9d869e2ffdf40259624a28edbf8057122fd19c2a67d4db9f044f33269143b3087b6fabdf95fc342aa66d7baecec9ede3fbd465879a15090571206ad957c
@@ -2,6 +2,8 @@ module StellarFederation
2
2
  module Api
3
3
  module V1
4
4
  class QueriesController < ApplicationController
5
+ before_filter :set_cors_headers, only: %i[index]
6
+
5
7
  def index
6
8
  result = Queries::ProcessQuery.(query_params: query_params)
7
9
 
@@ -30,6 +32,10 @@ module StellarFederation
30
32
  def query_params
31
33
  params.permit(:q, :type).to_hash.with_indifferent_access
32
34
  end
35
+
36
+ def set_cors_headers
37
+ response.headers["Access-Control-Allow-Origin"] = "*"
38
+ end
33
39
  end
34
40
  end
35
41
  end
@@ -1,3 +1,3 @@
1
1
  module StellarFederation
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar_federation-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Subido
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-26 00:00:00.000000000 Z
11
+ date: 2018-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails