-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
36 lines (29 loc) · 1021 Bytes
/
.htaccess
File metadata and controls
36 lines (29 loc) · 1021 Bytes
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
# Set environment variable for database connection
SetEnv HOSTINGER_ENV true
# Allow all headers for AJAX requests
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
Header set Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
Header set Access-Control-Allow-Credentials "true"
</IfModule>
# PHP Error Settings
php_flag display_errors on
php_value error_reporting 32767
php_value upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 300
php_value max_input_time 300
# Handle OPTIONS preflight requests
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
# Protect sensitive files
<FilesMatch "\.(env|ini|log|sh|sql|env.example|gitignore|htaccess|htpasswd|DS_Store)$">
Order allow,deny
Deny from all
</FilesMatch>
# Prevent directory listing
Options -Indexes
# Set default character set
AddDefaultCharset UTF-8