diff --git a/.gitignore b/.gitignore index 745c579..b13c3f2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,11 @@ /etc/* !/etc/zio/ +# /etc/caddy/ +!/etc/caddy/ +/etc/caddy/* +!/etc/caddy/snippets.caddyfile + # /etc/skel/ !/etc/skel/ /etc/skel/* diff --git a/etc/caddy/snippets.caddyfile b/etc/caddy/snippets.caddyfile new file mode 100644 index 0000000..05cf30b --- /dev/null +++ b/etc/caddy/snippets.caddyfile @@ -0,0 +1,20 @@ +(cors) { + @origin header Origin {args.0} + header @origin Access-Control-Allow-Origin "{args.0}" + header @origin Access-Control-Request-Method GET +} + +(nobots) { + respond /robots.txt 200 { + body "User-agent: * +Disallow: /" + close + } +} + +(tls-cf) { + tls { + dns cloudflare {args.0} + resolvers 1.1.1.1 + } +}