houdini/app/controllers/static_controller.rb

25 lines
518 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-05-31 17:39:16 +00:00
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
class StaticController < ApplicationController
layout 'layouts/static'
def terms_and_privacy
@theme = 'minimal'
end
def ccs
2020-06-10 22:31:47 +00:00
begin
Houdini.ccs.retrieve_ccs do |ccs|
if ccs.is_a? String
redirect_to ccs
else
send_data(ccs, type: 'application/gzip')
end
end
2020-06-10 22:31:47 +00:00
rescue => e
render body: nil, status: 500
end
end
end