remove x-sendfile for local development

This commit is contained in:
Christoph Haas 2026-02-03 00:01:58 +01:00
parent c09fcea025
commit d5221d9db0
9 changed files with 592 additions and 9 deletions

View file

@ -17,16 +17,17 @@ Rails.application.configure do
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
# Run rails dev:cache to toggle Action Controller caching.
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.public_file_server.headers = { 'cache-control' => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false
end
# if Rails.root.join('tmp/caching-dev.txt').exist?
# config.action_controller.perform_caching = true
# config.action_controller.enable_fragment_cache_logging = true
# config.public_file_server.headers = { 'cache-control' => "public, max-age=#{2.days.to_i}" }
# else
# config.action_controller.perform_caching = false
# end
# Change to :null_store to avoid any caching.
config.cache_store = :memory_store
# config.cache_store = :memory_store
config.cache_store = :null_store
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
@ -78,7 +79,7 @@ Rails.application.configure do
# images through the Rails application and prevent unauthorized access to
# images that are pending moderation. (A common problem with spammers uploading
# smartphone screenshots of card games.)
config.action_dispatch.x_sendfile_header = 'X-Sendfile'
#config.action_dispatch.x_sendfile_header = 'X-Sendfile'
# Where Shrine stores the screenshots
config.shrine_storage_path = ENV.fetch('SHRINE_STORAGE_PATH', 'shrine')