From 542b9dd68d79dbb3e8b7867b0ff83efbd8fa5d42 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 12 Nov 2024 01:51:58 -0600 Subject: [PATCH] bert: Add home.chandlerswift.com/sheets --- bert/services/http/home.chandlerswift.com.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bert/services/http/home.chandlerswift.com.nix b/bert/services/http/home.chandlerswift.com.nix index eef8812..506ef7d 100644 --- a/bert/services/http/home.chandlerswift.com.nix +++ b/bert/services/http/home.chandlerswift.com.nix @@ -6,6 +6,16 @@ root * /srv/www/home.chandlerswift.com reverse_proxy /grafana/* localhost:3000 # hide .git # ??? + + file_server /sheets/* { + browse ${./caddy-browse-template.html} + + # TOOD: is there a better way to strip the prefix here? This shouldn't be + # vulnerable to a directory traversal attack (and it doesn't really + # matter anyway; everything in there is public somewhere or another!) but + # it sorta feels wrong to do this without a `/sheets` suffix. + root /mnt/bigbird-public + } ''; systemd.tmpfiles.settings."10-home-chandlerswift-com" = { "/srv/www/home.chandlerswift.com" = {