5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/funnel/flash/policy.rb', line 5
def self.response
settings = Funnel::Configuration
accepted = settings.get(:accepted_origins)
response = "<?xml version=\"1.0\"?>"
response << "<!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">"
response << "<cross-domain-policy>"
if accepted.empty?
response << allow_tag("*")
else
accepted.each do |domain|
response << allow_tag(domain)
end
end
response << "</cross-domain-policy>"
response
end
|