From 2cf63cb33a8bbebb6d2ecf22fe20c3f023dc63ca Mon Sep 17 00:00:00 2001 From: Andrew Dryga Date: Thu, 28 Mar 2024 16:13:13 -0600 Subject: [PATCH] fix(portal): Serve static files with digests at root (#4386) Closes #4384 --- docker-compose.yml | 2 -- elixir/apps/web/lib/web/endpoint.ex | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ca075781a..6ee47a1ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: # Dependencies postgres: diff --git a/elixir/apps/web/lib/web/endpoint.ex b/elixir/apps/web/lib/web/endpoint.ex index 29f2d4c94..a35be3fdc 100644 --- a/elixir/apps/web/lib/web/endpoint.ex +++ b/elixir/apps/web/lib/web/endpoint.ex @@ -21,14 +21,13 @@ defmodule Web.Endpoint do plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint] # Serve at "/" the static files from "priv/static" directory. - # - # You should set gzip to true if you are running phx.digest - # when deploying your static files in production. plug Plug.Static, at: "/", from: :web, - gzip: false, - only: Web.static_paths() + gzip: true, + only: Web.static_paths(), + # allows serving digested files at the root + only_matching: ["site", "favicon"] # Code reloading can be explicitly enabled under the # :code_reloader configuration of your endpoint.