anmo 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -0
- data/lib/anmo/application.rb +12 -0
- data/lib/anmo/version.rb +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
data/lib/anmo/application.rb
CHANGED
@@ -73,6 +73,18 @@ module Anmo
|
|
73
73
|
def call env
|
74
74
|
request = Rack::Request.new(env)
|
75
75
|
|
76
|
+
if request.request_method.upcase == "OPTIONS"
|
77
|
+
return [
|
78
|
+
200,
|
79
|
+
{
|
80
|
+
"Access-Control-Allow-Origin" => "*",
|
81
|
+
"Access-Control-Allow-Methods" => "*",
|
82
|
+
"Access-Control-Allow-Headers" => "*"
|
83
|
+
},
|
84
|
+
""
|
85
|
+
]
|
86
|
+
end
|
87
|
+
|
76
88
|
controller_methods = [
|
77
89
|
:alive,
|
78
90
|
:version,
|
data/lib/anmo/version.rb
CHANGED