| Class | HTML::Pipeline::CamoFilter |
| In: |
lib/html/pipeline/camo_filter.rb
|
| Parent: | Filter |
HTML Filter for replacing http image URLs with camo versions. See:
All images provided in user content should be run through this filter so that http image sources do not cause mixed-content warnings in browser clients.
Context options:
:asset_proxy (required) - Base URL for constructed asset proxy URLs.
:asset_proxy_secret_key (required) - The shared secret used to encode URLs.
:asset_proxy_whitelist - Array of host Strings or Regexps to skip
src rewriting.
This filter does not write additional information to the context.
Hijacks images in the markup provided, replacing them with URLs that go through the github asset proxy.
Private: helper to hexencode a string. Each byte ends up encoded into two characters, zero padded value in the range [0-9a-f].
Implementation of validate hook. Errors should raise exceptions or use an existing validator.