hobby-cors 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hobby/cors.rb +4 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5e015f024ff9151f35aa4cf941f75ce9480c83984a0617dd12d56c991bdd8c7
4
- data.tar.gz: 7e693bc6293c8388293cf400b8a8b42574be5aecd1e9f8c6b34b6f4110ec12c0
3
+ metadata.gz: 934ae2aef4d37142c949402821b4d99cff338bd601a0083498dfd81449da57fe
4
+ data.tar.gz: b6e0c91b25717f87b7fa450f4fcec769d4e8ba19e04f7b5eb336575e97f1a262
5
5
  SHA512:
6
- metadata.gz: 5b73e2f5d700a708de2da36f5a7d09014fe944147d33742008b09542cae239b993cbf9578acd5106d8d42561acb2f7a3d6d114fa0807e344f016d51bb788bb4a
7
- data.tar.gz: 5078de1fd7f111cc68c5bbb680396b63bfa1696efb33533c044038e8081a7d4327d5df349b4f761edd4bc7d71a1c5688cd42ccae28542464a9dc37a8c629b06c
6
+ metadata.gz: a450eaaebfc62d0875de24d62251731bb3ea6ac45e7520efa6d508b52cebc4f8d3d89f5041c8405f445ee3b211f7baa82051281a2c62ee8c13c41a08012b23c8
7
+ data.tar.gz: 279cd70374c72188c1bbb636a321bd589475ce08d96a4a9cb6ad0e3984839ec5d716e49bc41d6e15fde58ba7034b8d36029ca69583d123ada794b7dc6ee9bca0
data/lib/hobby/cors.rb CHANGED
@@ -4,7 +4,10 @@ module Hobby
4
4
  class CORS
5
5
  def initialize app, origins: nil
6
6
  @app = app
7
- @origins = origins
7
+ @origins = if origins
8
+ require 'set'
9
+ Set.new origins
10
+ end
8
11
  end
9
12
 
10
13
  def call env
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobby-cors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoly Chernov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-28 00:00:00.000000000 Z
11
+ date: 2021-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack