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

raeburn raeburn at source.lon-capa.org
Sun Sep 6 15:29:00 EDT 2020


raeburn		Sun Sep  6 19:29:00 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /doc/loncapafiles	webserver.piml 
  Log:
  - For 2.11
    Backport 1.53
  
  
Index: doc/loncapafiles/webserver.piml
diff -u doc/loncapafiles/webserver.piml:1.43.2.6 doc/loncapafiles/webserver.piml:1.43.2.7
--- doc/loncapafiles/webserver.piml:1.43.2.6	Thu Mar  5 18:35:49 2020
+++ doc/loncapafiles/webserver.piml	Sun Sep  6 19:29:00 2020
@@ -2,7 +2,7 @@
 	"http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- webserver.piml -->
 
-<!-- $Id: webserver.piml,v 1.43.2.6 2020/03/05 18:35:49 raeburn Exp $ -->
+<!-- $Id: webserver.piml,v 1.43.2.7 2020/09/06 19:29:00 raeburn Exp $ -->
 
 <!--
 
@@ -227,7 +227,9 @@
             }
             my $hostname = Sys::Hostname::FQDN::fqdn();
             my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost');
-            my @expected = ('RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)',
+            my @expected = ('RewriteEngine on',
+                            'RewriteCond %{HTTPS} =on',
+                            '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',
@@ -283,9 +285,9 @@
                     foreach my $item (@rewrites) {
                         if (ref($item) eq 'ARRAY') {
                             my $found = 0;
-                            foreach my $item (@rewrites) {
+                            foreach my $line (@{$item}) {
                                 foreach my $match (@expected) {
-                                    if ($match eq $item) {
+                                    if ($match eq $line) {
                                         $found ++;
                                         last;
                                     }
@@ -293,6 +295,7 @@
                             }
                             if ($found >= @expected) {
                                 $gotrules = 1;
+                                last;
                             }
                         }
                     }




More information about the LON-CAPA-cvs mailing list