diff --git a/app/controllers/widget_controller.rb b/app/controllers/widget_controller.rb index f0778aaf..0dd7b1c8 100644 --- a/app/controllers/widget_controller.rb +++ b/app/controllers/widget_controller.rb @@ -1,5 +1,6 @@ class WidgetController < ApplicationController def v2 - redirect_to(asset_pack_url("donate-button-v2.js")) + expires_in 10.minutes + head :found, location: helpers.asset_pack_url("donate-button-v2.js"), content_type: "application/javascript" end end diff --git a/config/routes.rb b/config/routes.rb index 6b4a9737..38d21f97 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -259,4 +259,4 @@ Rails.application.routes.draw do get '/js/donate-button.v2.js' => 'widget#v2' root to: 'front#index' -end +end \ No newline at end of file