24 lines
631 B
ApacheConf
24 lines
631 B
ApacheConf
# Enable rewrite engine
|
|
RewriteEngine On
|
|
|
|
# Redirect to index.html if no file specified
|
|
DirectoryIndex index.html
|
|
|
|
# Security headers
|
|
<IfModule mod_headers.c>
|
|
Header set X-Content-Type-Options "nosniff"
|
|
Header set X-Frame-Options "SAMEORIGIN"
|
|
Header set X-XSS-Protection "1; mode=block"
|
|
</IfModule>
|
|
|
|
# PHP error handling (production)
|
|
php_flag display_errors off
|
|
php_flag log_errors on
|
|
|
|
# Enable CORS for API endpoint
|
|
<FilesMatch "send-email\.php">
|
|
Header set Access-Control-Allow-Origin "*"
|
|
Header set Access-Control-Allow-Methods "POST"
|
|
Header set Access-Control-Allow-Headers "Content-Type"
|
|
</FilesMatch>
|