capistrano-devops 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80fc78f1d316bac15d1724ecf16b4acd4d80fd54
4
- data.tar.gz: d43311420c436c058f8b9dac144cef7cb9402eb1
3
+ metadata.gz: dbaf68a8e509b659f678370e8bc6d35e90d20eb0
4
+ data.tar.gz: e8dcd7aefb2695300b5a7090ca98e0b9db5f2715
5
5
  SHA512:
6
- metadata.gz: 79663e3c80e72c81d8419f9d898c5d6420a5ed45d6ab5eba22223302969ef81da927175355e4a8bce41671982ba73c25be7493a3fffe7fa7d8a00b96d2252abd
7
- data.tar.gz: b38e348881892c97e4c353cf3e47ef7f4172b583688ecc44138af358a28a42451f092356b425ec02bd498979ab79e65647e1f907c75e1b356774f3cb0baec9e2
6
+ metadata.gz: 25e156503d0f6500fa6c198977d944bb159b551326d07c09c366661bb2870aec59a080c54bacb4578fc3a9f1c99599afff1c5d7f59ad392da9c8d6a64e75fa32
7
+ data.tar.gz: 1a175b7e762be863af7075e98151c1c17a7647051ccd6b6a160b013bbf4cff6f1c4827d8996f381d97efaa80b29db9ea9aab8b8b7f532e5faf9a983991f3f90e
@@ -22,9 +22,23 @@ server {
22
22
 
23
23
  try_files $uri/index.html $uri @backend_<%= fetch(:application) %>;
24
24
  location @backend_<%= fetch(:application) %> {
25
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26
- proxy_set_header Host $http_host;
25
+
26
+ # For CORS
27
+ if ( $request_method = OPTIONS ) {
28
+ add_header Access-Control-Allow-Origin "*";
29
+ add_header Access-Control-Allow-Methods "GET, OPTIONS";
30
+ add_header Access-Control-Allow-Headers "Authorization";
31
+ add_header Access-Control-Allow-Credentials "true";
32
+ add_header Content-Length 0;
33
+ add_header Content-Type text/plain;
34
+ return 200;
35
+ }
36
+
27
37
  proxy_redirect off;
38
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
39
+ proxy_set_header X-Real-IP $remote_addr;
40
+ proxy_set_header Host $http_host;
41
+
28
42
  proxy_pass http://backend_<%= fetch(:application) %>;
29
43
  }
30
44
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Devops
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-devops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - tristan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-16 00:00:00.000000000 Z
11
+ date: 2013-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano