enable gzip in prod

This commit is contained in:
Vamsi Krishna B 2021-07-20 11:29:34 +05:30
parent 68b6bfc580
commit 0016657a1e
2 changed files with 5 additions and 4 deletions

View File

@ -41,12 +41,13 @@ explorer_hostname =
config :zcash_explorer, ZcashExplorerWeb.Endpoint,
url: [
host: explorer_hostname,
host: explorer_hostname,
port: String.to_integer(System.get_env("EXPLORER_PORT") || "443"),
scheme: "https"],
scheme: "https"
],
http: [
port: String.to_integer(System.get_env("PORT") || "4000"),
transport_options: [socket_opts: [:inet6]]
transport_options: [socket_opts: [:inet6], compress: true]
],
secret_key_base: secret_key_base

View File

@ -23,7 +23,7 @@ defmodule ZcashExplorerWeb.Endpoint do
plug Plug.Static,
at: "/",
from: :zcash_explorer,
gzip: false,
gzip: true,
only: ~w(css fonts images js favicon.ico robots.txt)
# Code reloading can be explicitly enabled under the