freeze break request - fedora mobile proxy

Ricky Elrod codeblock at elrod.me
Wed Jun 26 19:56:28 UTC 2013


On 06/26/2013 03:36 PM, Toshio Kuratomi wrote:
> Since this is a proxy, what happens to cookies that are sent to when you hit
> https://fedoraproject.org/mobile ?  Are they forwarded to github.io?

Really good point.

This might fix it.

-Ricky

diff --git a/manifests/services/proxy.pp b/manifests/services/proxy.pp
index 2d615b0..316b6de 100644
--- a/manifests/services/proxy.pp
+++ b/manifests/services/proxy.pp
@@ -432,6 +432,12 @@ class proxy {
       proxyurl => "http://localhost:10018",
     }

+    fedora-mobile::proxy { "fedoraproject.org/mobile":
+      website => "fedoraproject.org",
+      path => "/mobile",
+      proxyurl => "http://fedora-infra.github.io/mobile",
+    }
+
     httpd::mime-type { "site icon":
         website => "fedoraproject.org",
         mimetype => "image/vnd.microsoft.icon",
diff --git a/modules/fedora-mobile/README b/modules/fedora-mobile/README
new file mode 100644
index 0000000..770f746
--- /dev/null
+++ b/modules/fedora-mobile/README
@@ -0,0 +1,5 @@
+# Fedora Mobile landing site
+
+This proxies fp.o/mobile to github pages:
+
+http://fedora-infra.github.io/mobile/
diff --git a/modules/fedora-mobile/manifests/init.pp
b/modules/fedora-mobile/manifests/init.pp
new file mode 100644
index 0000000..6626b9b
--- /dev/null
+++ b/modules/fedora-mobile/manifests/init.pp
@@ -0,0 +1,16 @@
+define fedora-mobile::proxy(
+    $website,
+    $path,
+    $proxyurl
+) {
+    include httpd::base
+
+    file { "/etc/httpd/conf.d/$website/fedora-mobile.conf":
+        owner   => "root",
+        group   => "root",
+        mode    => 0644,
+        content => template("fedora-mobile/fedora-mobile-proxy.conf.erb"),
+        notify  => Service["httpd"],
+        require => Httpd::Website[$website],
+    }
+}
diff --git
a/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb
b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb
new file mode 100644
index 0000000..9da4748
--- /dev/null
+++ b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb
@@ -0,0 +1,8 @@
+RewriteEngine On
+
+ProxyPass <%= path %> <%= proxyurl %>
+ProxyPassReverse <%= path %> <%= proxyurl %>
+
+<Location "/mobile">
+  RequestHeader unset Cookie
+</Location>




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20130626/eba63f63/attachment.sig>


More information about the infrastructure mailing list