Sha256: 375dc62f2b7fbffe538c3cc5adc774a9cbc42e8e6e314dc68a3d3cfd0e859a83

Contents?: true

Size: 619 Bytes

Versions: 11

Compression:

Stored size: 619 Bytes

Contents

module Firehose
  module SwfPolicyRequest

    # Borrowed from: https://github.com/igrigorik/em-websocket/blob/3e7f7d7760cc23b9d1d34fc1c17bab4423b5d11a/lib/em-websocket/connection.rb#L104
    def handle_swf_policy_request(data)
      if data =~ /\A<policy-file-request\s*\/>/
        Firehose.logger.debug "Received SWF Policy request: #{data.inspect}"
        send_data policy
        close_connection_after_writing
        true
      end
    end

    def policy
      <<-EOS
<?xml version="1.0"?>
<cross-domain-policy>
  <allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>
      EOS
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
firehose-1.1.1 lib/firehose/swf_policy_request.rb
firehose-1.1.0 lib/firehose/swf_policy_request.rb
firehose-1.0.0 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.10 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.9 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.8 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.7 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.6 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.5 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.3 lib/firehose/swf_policy_request.rb
firehose-0.2.alpha.2 lib/firehose/swf_policy_request.rb