From 666ddc7530d14028c4b173e0d61231c092f435df Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Thu, 18 Jan 2024 09:34:08 +0100 Subject: [PATCH] Added caddy proxy config --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 2693cb4..fe01998 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,28 @@ you can use `serve build` ## Hosting I'm currently serving the files directly from an `s3`-bucket using caddy. +```Caddyfile +ccw.icu { + # match .html files and folders (because they'll be redirected to index.html + @html { + path_regexp (\.html|^(.*)/)$ + } + # match .css files + @css { + path_regexp \.css$ + } + # auto index.html redirect + uri * path_regexp ^(.*)/$ $1/index.html + header @html -Content-Type text/html + # set default content type for css + header @css ?Content-Type text/css + # unset content type for .css files + header @css -Content-Type + # internally rewrite url to suite s3 bucket + # "website" - bucket name + rewrite * /website/{path} + reverse_proxy :9000 +} +``` + [![builds.sr.ht status](https://builds.hut.ccw.icu/~comcloudway/pages.svg)](https://builds.hut.ccw.icu/~comcloudway/pages?) -- 2.38.5