File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -124,3 +124,7 @@ RedirectMatch 403 ^/main/inc/lib/javascript/bigupload/files
124124<IfModule mod_headers.c >
125125 Header always set X-Content-Type-Options nosniff
126126</IfModule >
127+
128+ <Files "web.config" >
129+ Require all denied
130+ </Files >
Original file line number Diff line number Diff line change @@ -757,11 +757,22 @@ <h3>Apache RewriteRules</h3>
757757 RewriteRule ^(tests|.git) - [F,L,NC]
758758 </Directory>
759759
760- AddType application/font-woff .woff .woff2
761- <IfModule mod_expires.c>
762- ExpiresActive On
763- ExpiresByType application/font-woff "access plus 1 month"
764- </IfModule>
760+ AddType application/font-woff .woff .woff2
761+ <IfModule mod_expires.c>
762+ ExpiresActive On
763+ ExpiresByType application/font-woff "access plus 1 month"
764+ </IfModule>
765+ # Disallow direct access to /main/inc/lib/javascript/bigupload/files
766+ RedirectMatch 403 ^/main/inc/lib/javascript/bigupload/files
767+
768+ # Disallow MIME sniffing to prevent XSS from unknown/incorrect file extensions
769+ < IfModule mod_headers.c >
770+ Header always set X-Content-Type-Options nosniff
771+ </ IfModule >
772+
773+ < Files "web.config">
774+ Require all denied
775+ </ Files >
765776 </ pre >
766777
767778 < h4 > Special note on sharing questions between courses</ h4 >
@@ -856,6 +867,10 @@ <h3>Nginx</h3>
856867 }
857868 location ^~ /tests/ {
858869 deny all;
870+ }
871+ location ~* /web.config$ {
872+ deny all;
873+ return 403;
859874 }
860875 </ pre >
861876
You can’t perform that action at this time.
0 commit comments