Fix font loading

This commit is contained in:
2024-02-17 10:47:28 +11:00
parent a6078f882e
commit cfa0184086

View File

@@ -16,7 +16,11 @@ require "rack/rewrite"
use Rack::Rewrite do use Rack::Rewrite do
# remove trailing slashes # remove trailing slashes
r302 %r{(/.*)/(\?.*)?$}, "$1$2" 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 end
require "adamantium/middleware/header_fix" require "adamantium/middleware/header_fix"