[LON-CAPA-cvs] cvs: doc /loncapafiles webserver.piml

raeburn raeburn at source.lon-capa.org
Sat Apr 13 00:24:26 EDT 2019


raeburn		Sat Apr 13 04:24:26 2019 EDT

  Modified files:              
    /doc/loncapafiles	webserver.piml 
  Log:
  - Make check of rewrite rules for https -> http consistet with rev. 1.2 of
    doc/install/linux/sslrewrite.conf, installed by install.pl.
  
  
Index: doc/loncapafiles/webserver.piml
diff -u doc/loncapafiles/webserver.piml:1.45 doc/loncapafiles/webserver.piml:1.46
--- doc/loncapafiles/webserver.piml:1.45	Thu Nov  1 18:12:56 2018
+++ doc/loncapafiles/webserver.piml	Sat Apr 13 04:24:26 2019
@@ -2,7 +2,7 @@
 	"http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- webserver.piml -->
 
-<!-- $Id: webserver.piml,v 1.45 2018/11/01 18:12:56 raeburn Exp $ -->
+<!-- $Id: webserver.piml,v 1.46 2019/04/13 04:24:26 raeburn Exp $ -->
 
 <!--
 
@@ -227,7 +227,9 @@
             }
             my $hostname = Sys::Hostname::FQDN::fqdn();
             my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost');
-            my @expected = ('RewriteRule ^/adm/wrapper/ext/(?!https:\/\/) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]',
+            my @expected = ('RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:\/\/)',
+                            'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)',
+                            'RewriteRule ^/adm/wrapper/ext/(?!https:\/\/) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]',
                             'RewriteCond %{REMOTE_ADDR} 127.0.0.1',
                             'RewriteRule (.*) - [L]');
             if (($hostip ne '') && ($hostip ne '127.0.0.1')) {
@@ -235,7 +237,7 @@
                                 'RewriteRule (.*) - [L]'));
             }
             push(@expected,('RewriteCond %{REQUEST_URI} ^/public/.*/syllabus$',
-                            'RewriteCond %{QUERY_STRING} (^|&)usehttp=1($|&)',
+                            'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)',
                             'RewriteRule ^/public/.*/syllabus$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]'));
             if (-d $ssldir) {
                 my @rewrites;




More information about the LON-CAPA-cvs mailing list