]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/cors.rb
Update Potlatch 2 to 2.5-57-gaa163622 build
[rails.git] / config / initializers / cors.rb
index ee0b0d98fe236f74f9ce1e1a6fdba5fc528a31e6..2bd558d2f3f24ec4f4f9884cb9b1cf4c815505dc 100644 (file)
@@ -7,9 +7,7 @@ module OpenStreetMap
   class Cors < Rack::Cors
     def call(env)
       status, headers, body = super env
-      if headers["Access-Control-Allow-Origin"]
-        headers["Cache-Control"] = "no-cache"
-      end
+      headers["Cache-Control"] = "no-cache" if headers["Access-Control-Allow-Origin"]
       [status, headers, body]
     end
   end