From 8d4b9d172d8f5c4fe09e584f84dcb87eeac182b8 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Thu, 14 Nov 2019 16:10:48 -0600 Subject: [PATCH] js/donate-button.v2.js now redirects to the asset pack --- app/controllers/widget_controller.rb | 3 ++- config/routes.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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