mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
38 lines
1.0 KiB
Caddyfile
38 lines
1.0 KiB
Caddyfile
# KoalaSync - Production Caddy Configuration Example
|
|
# Replace domains and paths with your actual setup.
|
|
|
|
# 1. Marketing Website & Invitation Bridge
|
|
sync.koalastuff.net {
|
|
root * /var/www/koalasync/website
|
|
file_server
|
|
encode zstd gzip
|
|
|
|
# Security Headers
|
|
header {
|
|
# Prevent FLoC tracking
|
|
Permissions-Policy interest-cohort=()
|
|
# Security best practices
|
|
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
X-Content-Type-Options nosniff
|
|
X-Frame-Options DENY
|
|
Referrer-Policy no-referrer-when-downgrade
|
|
}
|
|
}
|
|
|
|
# 2. Relay Server (Socket.IO / WebSocket)
|
|
syncserver.koalastuff.net {
|
|
reverse_proxy localhost:3000 {
|
|
# Ensure WebSocket support is explicitly handled if needed
|
|
# (Caddy usually handles this automatically)
|
|
header_up Host {host}
|
|
header_up X-Real-IP {remote_host}
|
|
}
|
|
|
|
# Security Headers for the relay
|
|
header {
|
|
X-Content-Type-Options nosniff
|
|
X-Frame-Options DENY
|
|
Referrer-Policy no-referrer
|
|
}
|
|
}
|