| 12345678910111213141516171819202122232425262728 |
- love.hdlife.me {
- # Basic Auth - 使用 htpasswd 文件
- # 生成命令(在服务器上执行):
- # docker run --rm httpd:alpine htpasswd -nbB admin your_password > htpasswd
- basicauth * htpasswd
- # 反向代理到 byreal-table 服务
- reverse_proxy byreal-table:3000
- # 日志配置
- log {
- output file /var/log/caddy/access.log {
- roll_size 10MB
- roll_keep 5
- }
- }
- # 安全响应头
- header {
- # 移除 Server 头
- -Server
- # 安全头
- Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
- X-Content-Type-Options "nosniff"
- X-Frame-Options "DENY"
- X-XSS-Protection "1; mode=block"
- }
- }
|