mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
allow onebox whitelist to be extended
This commit is contained in:
parent
c4af6297b4
commit
2b3cdf9f38
1 changed files with 15 additions and 18 deletions
|
@ -8,10 +8,9 @@
|
||||||
#******************************************************************************#
|
#******************************************************************************#
|
||||||
|
|
||||||
module Oneboxer
|
module Oneboxer
|
||||||
|
|
||||||
module Whitelist
|
module Whitelist
|
||||||
def self.entries
|
def self.entries
|
||||||
[
|
@entries ||= [
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?findery\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?findery\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?zappos\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?zappos\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?slideshare\.net\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?slideshare\.net\/.+/),
|
||||||
|
@ -97,8 +96,6 @@ module Oneboxer
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
class Entry
|
class Entry
|
||||||
# oembed = false is probably safer, but this is the least-drastic change
|
# oembed = false is probably safer, but this is the least-drastic change
|
||||||
def initialize(pattern, oembed = true)
|
def initialize(pattern, oembed = true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue