lib/onebox.rb in onebox-1.7.8 vs lib/onebox.rb in onebox-1.7.9
- old
+ new
@@ -7,19 +7,22 @@
require "moneta"
require "cgi"
require "net/http"
require "digest"
require "fast_blank"
+require "sanitize"
+require_relative "onebox/sanitize_config"
module Onebox
DEFAULTS = {
cache: Moneta.new(:Memory, expires: true, serializer: :json),
connect_timeout: 5,
timeout: 10,
max_download_kb: (10 * 1024), # 10MB
load_paths: [File.join(Gem::Specification.find_by_name("onebox").gem_dir, "templates")],
allowed_ports: [80, 443],
allowed_schemes: ["http", "https"],
+ sanitize_config: Sanitize::Config::ONEBOX,
}
@@options = DEFAULTS
def self.preview(url, options = Onebox.options)