Set expiry of theme CSS to 3 months

The `ETag` from `fresh_when` takes care of cache busting here.
This commit is contained in:
Karina Kwiatek 2023-02-01 19:00:17 +01:00
parent aaf797ed12
commit 99403988b7

View file

@ -24,7 +24,7 @@ class UserController < ApplicationController
theme = Theme.where(user: User.where("LOWER(screen_name) = ?", params[:username].downcase).select(:id)).first
return head :no_content if theme.nil?
expires_in 1.day
expires_in 3.months
return if fresh_when theme, public: true
render plain: get_theme_css(theme), content_type: "text/css"