I have a fairly typical subfolder/reverse proxy setup with Apache as the reverse proxy.
First there were issues with insecure assets, so I forced_https in ENV. Now when retrieving assets like stylesheets/color_definitions_light_7_1_6cfae4de9c47a1b8ed3d5748018236d10ea9107e.css?__ws=site.com
Maybe I’m doing something stupid, but I’m getting this:
ArgumentError (comparison of Time with String failed)
app/controllers/stylesheets_controller.rb:66:in `<='
app/controllers/stylesheets_controller.rb:66:in `show_resource'
app/controllers/stylesheets_controller.rb:19:in `show'
app/controllers/application_controller.rb:414:in `block in with_resolved_locale'
app/controllers/application_controller.rb:414:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:369:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:228:in `call'
if !cache_time.to_date.nil? && !stylesheet_time.to_date.nil?
if (stylesheet_time.to_date <= cache_time.to_date)
return render body: nil, status: 304
end
end
It looks like it’s possible for to_date to turn something that’s truthy into a nil date, I guess.
No. That doesn’t work either. I ended up wrapping the section in a begin/rescue/end.
I’m very confused how this could be affecting only this subfolder/reverse-proxied site.
I had the some problem (also while using the subfolder setup). After fixing an unrelated mixed content warning by setting the force_https setting to true, the issue went away …
I got the exact same issue with NGINX instead of Apache as reverse proxy.
Did you find a solution?
By the way it’s only failed with the Desktop version, no issue at all with the mobile version.
I by pass it by disabling the buffering on the reverse proxy