diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index a87117aee..334619f17 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class CatalogController < ApplicationController - caches_page :show, expires_in: 24.hours + caches_page :show caches_action :index, expires_in: 12.hours, cache_path: Proc.new { |c| c.request.url } include FacetParamsDedupe @@ -13,6 +13,7 @@ class CatalogController < ApplicationController include ServerErrors include LCClassifications + skip_forgery_protection only: [:index] before_action :authenticate_purchase_order!, only: [ :purchase_order, :purchase_order_action ] before_action :set_thread_request before_action only: :index do diff --git a/config/environments/production.rb b/config/environments/production.rb index 30b8a0f94..8d6c877a4 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -136,4 +136,6 @@ # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session Deprecation.default_deprecation_behavior = :silence + config.action_controller.page_cache_directory = Rails.root.join("tmp", "cached_pages") +end end