Module: Scrivito::BinaryRewrite
- Defined in:
- app/cms/scrivito/binary_rewrite.rb
Overview
This module lets you change the URL of a binary CMS object for the purpose of fetching the binary data from a different location (e.g. via a proxy or from a mirror).
Class Method Summary collapse
-
.enable_for(request, &block) ⇒ Object
You can, for example, have the URLs of images, etc., point to your desired domain instead of to the CDN Scrivito uses.
Class Method Details
.enable_for(request, &block) ⇒ Object
You can, for example, have the URLs of images, etc., point to your desired domain instead of to the CDN Scrivito uses.
31 32 33 |
# File 'app/cms/scrivito/binary_rewrite.rb', line 31 def self.enable_for(request, &block) request.env["SCRIVITO_BINARY_URL_CALLBACK"] = block end |