]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: add clientaccesspolicy.xml + crossdomain.xml
authorGrant Slater <git@firefishy.com>
Fri, 3 Jun 2016 21:00:59 +0000 (22:00 +0100)
committerGrant Slater <git@firefishy.com>
Fri, 3 Jun 2016 21:00:59 +0000 (22:00 +0100)
cookbooks/imagery/files/default/clientaccesspolicy.xml [new file with mode: 0644]
cookbooks/imagery/files/default/crossdomain.xml [new file with mode: 0644]
cookbooks/imagery/resources/site.rb

diff --git a/cookbooks/imagery/files/default/clientaccesspolicy.xml b/cookbooks/imagery/files/default/clientaccesspolicy.xml
new file mode 100644 (file)
index 0000000..d60ec1d
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<access-policy>
+  <cross-domain-access>
+    <policy>
+      <allow-from http-request-headers="*">
+        <domain uri="*"/>
+      </allow-from>
+      <grant-to>
+        <resource path="/" include-subpaths="true"/>
+      </grant-to>
+    </policy>
+  </cross-domain-access>
+</access-policy>
diff --git a/cookbooks/imagery/files/default/crossdomain.xml b/cookbooks/imagery/files/default/crossdomain.xml
new file mode 100644 (file)
index 0000000..6b51ee3
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+  <allow-access-from domain="*"/>
+</cross-domain-policy>
index ea5884563aa22985f90f003626a32f2f21bcb5df..84151ae66e17a752a6eba0011c2943a21a0a1e28 100644 (file)
@@ -62,6 +62,20 @@ action :create do
     mode 0644
   end
 
+  cookbook_file "/srv/#{name}/clientaccesspolicy.xml" do
+    source "clientaccesspolicy.xml"
+    user "root"
+    group "root"
+    mode 0644
+  end
+
+  cookbook_file "/srv/#{name}/crossdomain.xml" do
+    source "crossdomain.xml"
+    user "root"
+    group "root"
+    mode 0644
+  end
+
   layers = Dir.glob("/srv/imagery/layers/#{name}/*.yml").collect do |path|
     YAML.load(::File.read(path))
   end