-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
77 lines (66 loc) · 2.29 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# php_flag display_startup_errors off
# php_flag display_errors off
# php_flag html_errors off
# php_value docref_root 0
# php_value docref_ext 0
<IfModule mod_rewrite.c>
Options -MultiViews
Options All -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.php [L]
RewriteRule ^node_modules/$ - [R=403,L]
RewriteRule ^src/$ - [R=403,L]
RewriteRule ^assets/$ - [R=403,L]
RewriteRule ^vendor/$ - [R=403,L]
</IfModule>
<FilesMatch "^(.json|.yml|.env|.env.sample|.gitignore|.htaccess|composer.json|composer.lock|package-lock.json|package.json|.config.js|.md)$">
Require all denied
</FilesMatch>
## SECURITY START
ServerSignature Off
<IfModule mod_expires.c>
Header add Access-Control-Allow-Origin "*"
Header unset ETag
FileETag None
</IfModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header always append X-Frame-Options SAMEORIGIN
Header set X-Content-Type-Options nosniff
</IfModule>
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>
## SECURITY END