Skip to content

Commit

Permalink
Do not allow dangerous files in js folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaiMagal authored Nov 1, 2023
1 parent 05ad606 commit f458c3a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions js/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,25 @@
</IfModule>


# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
<Files ~ "(?i)^.*\.(css|js|gif|png)$">
Allow from all
</Files>
<Files ~ "(?i)^.*(jquery\.noConflict\.php|retro-compat\.js\.php)$">
Allow from all
</Files>
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
<Files ~ "(?i)^.*\.(css|js|gif|png)$">
Require all granted
</Files>
<Files ~ "(?i)^.*(jquery\.noConflict\.php|retro-compat\.js\.php)$">
Require all granted
</Files>
</IfModule>

0 comments on commit f458c3a

Please sign in to comment.