Skip to content

Commit

Permalink
Update naive_Caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lxhao61 committed Jun 14, 2021
1 parent aeae07c commit 3587041
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions naiveproxy(caddy+forwardproxy)/naive_Caddyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
order forward_proxy before header
order forward_proxy before route
admin off
log { #注意:版本不小于v2.4.0才支持日志全局配置,否则各自配置。
output file /var/log/caddy/access.log
Expand Down Expand Up @@ -28,10 +28,12 @@
@host {
host xx.yy #限定域名访问(禁止以ip方式访问网站),更改为自己的域名。
}
header @host {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" #启用HSTS
}
file_server @host {
root /var/www/html #更改为自己存放的web文件路径
route @host {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" #启用HSTS
}
file_server {
root /var/www/html #更改为自己存放的web文件路径
}
}
}

0 comments on commit 3587041

Please sign in to comment.