Class: Slds::SldsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Slds::SldsController
- Defined in:
- app/controllers/slds/slds_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/slds/slds_controller.rb', line 7 def show if slds_response.code == '200' # set our response headers expires_in Slds.max_age, 's-maxage' => Slds.s_maxage, public: true response.headers['Surrogate-Key'] = 'DFC-SLDS-ASSETS' # allow these to be expired from fastly as a group elsif slds_response.code == '404' slds_response.body = 'not found' end render( body: slds_response.body, content_type: slds_response.content_type, status: slds_response.code ) end |