hobby-cors 0.0.0

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 +7 -0
  2. data/lib/hobby/cors.rb +13 -0
  3. metadata +57 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 494fee694e14e61b1aecc95e43b752d51aa0e1bafdc8f7072bd49a281273e8c0
4
+ data.tar.gz: 387d2c9722827471b5623e1faca1dd129dd4a931dc6f7c1a3eec3cd1fc191a72
5
+ SHA512:
6
+ metadata.gz: 13283068cf585bb0465dc3dea3c62f6b6345e70b06a8be76b0d3bf55db41350b72d29cff8907e8e1323936454f66f459d93cce6a91ab79ec484e60e8838ac300
7
+ data.tar.gz: 558c4f85d9981d7262fcaa1dea50f270d25b458eb0b4359613a99586109007e089e0546f70c34cf94273d84060f9910cdcb5035785cc78e9fc9f5716a85ce597
@@ -0,0 +1,13 @@
1
+ module Hobby
2
+ class Cors
3
+ def initialize app
4
+ @app = app
5
+ end
6
+
7
+ def call env
8
+ status, headers, body = @app.call env
9
+ headers['Access-Control-Allow-Origin'] = '*'
10
+ [status, headers, body]
11
+ end
12
+ end
13
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hobby-cors
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Anatoly Chernow
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rack
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description:
28
+ email:
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - lib/hobby/cors.rb
34
+ homepage:
35
+ licenses: []
36
+ metadata: {}
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubyforge_project:
53
+ rubygems_version: 2.7.6
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: A Rack CORS middleware without complexities.
57
+ test_files: []