Enable logging
log {
output file C:\caddy\logs\access.log
format json
}
# Optional: Add security headers
header {
#Enable HSTS
Strict-Transport-Security "max-age=31536000; includeSubDomains"
# Prevent clickjacking
X-Frame-Options "SAMEORIGIN"
# XSS Protection
X-Content-Type-Options "nosniff"
}
}
#Optional: Redirect www to non-www
www.greatnewstolisten.com {
redir https://greatnewstolisten.com{uri} permanent
}
#I need allow any one can access or view any files in this folder on the web
static.greatnewstolisten.com {
# Set the root directory for the static files
root * c:/FileListToShare/
# Enable the file server
file_server
}