enable gzip in prod
This commit is contained in:
parent
68b6bfc580
commit
0016657a1e
|
@ -41,12 +41,13 @@ explorer_hostname =
|
||||||
|
|
||||||
config :zcash_explorer, ZcashExplorerWeb.Endpoint,
|
config :zcash_explorer, ZcashExplorerWeb.Endpoint,
|
||||||
url: [
|
url: [
|
||||||
host: explorer_hostname,
|
host: explorer_hostname,
|
||||||
port: String.to_integer(System.get_env("EXPLORER_PORT") || "443"),
|
port: String.to_integer(System.get_env("EXPLORER_PORT") || "443"),
|
||||||
scheme: "https"],
|
scheme: "https"
|
||||||
|
],
|
||||||
http: [
|
http: [
|
||||||
port: String.to_integer(System.get_env("PORT") || "4000"),
|
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
|
secret_key_base: secret_key_base
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ defmodule ZcashExplorerWeb.Endpoint do
|
||||||
plug Plug.Static,
|
plug Plug.Static,
|
||||||
at: "/",
|
at: "/",
|
||||||
from: :zcash_explorer,
|
from: :zcash_explorer,
|
||||||
gzip: false,
|
gzip: true,
|
||||||
only: ~w(css fonts images js favicon.ico robots.txt)
|
only: ~w(css fonts images js favicon.ico robots.txt)
|
||||||
|
|
||||||
# Code reloading can be explicitly enabled under the
|
# Code reloading can be explicitly enabled under the
|
||||||
|
|
Loading…
Reference in New Issue