From cfa01840860e5bda8bf1b3dbe1a14977d2f9a977 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 17 Feb 2024 10:47:28 +1100 Subject: [PATCH] Fix font loading --- config.ru | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.ru b/config.ru index f70a20d..c7b64a3 100644 --- a/config.ru +++ b/config.ru @@ -16,7 +16,11 @@ require "rack/rewrite" use Rack::Rewrite do # remove trailing slashes r302 %r{(/.*)/(\?.*)?$}, "$1$2" - r302 %r{/fonts/(.*)?$}, "/assets/$1" + r302 %r{/fonts/(.*)?$}, lambda { |match, rack_env| + manifest = JSON.parse(File.read("public/assets/main/assets.json")) + + manifest[match[1]]["url"] + } end require "adamantium/middleware/header_fix"