Enable gzip in prod
This commit is contained in:
@@ -21,12 +21,13 @@ defmodule MusicLibraryWeb.Endpoint do
|
|||||||
|
|
||||||
# Serve at "/" the static files from "priv/static" directory.
|
# Serve at "/" the static files from "priv/static" directory.
|
||||||
#
|
#
|
||||||
# You should set gzip to true if you are running phx.digest
|
# When code reloading is disabled (e.g., in production),
|
||||||
# when deploying your static files in production.
|
# the `gzip` option is enabled to serve compressed
|
||||||
|
# static files generated by running `phx.digest`.
|
||||||
plug Plug.Static,
|
plug Plug.Static,
|
||||||
at: "/",
|
at: "/",
|
||||||
from: :music_library,
|
from: :music_library,
|
||||||
gzip: false,
|
gzip: not code_reloading?,
|
||||||
only: MusicLibraryWeb.static_paths()
|
only: MusicLibraryWeb.static_paths()
|
||||||
|
|
||||||
if Code.ensure_loaded?(Tidewave) do
|
if Code.ensure_loaded?(Tidewave) do
|
||||||
|
|||||||
Reference in New Issue
Block a user