|
|
|
@ -5,6 +5,24 @@ |
|
|
|
|
# is restricted to this project. |
|
|
|
|
import Config |
|
|
|
|
|
|
|
|
|
network_path = |
|
|
|
|
"NETWORK_PATH" |
|
|
|
|
|> System.get_env("/") |
|
|
|
|
|> (&(if !String.ends_with?(&1, "/") do |
|
|
|
|
&1 <> "/" |
|
|
|
|
else |
|
|
|
|
&1 |
|
|
|
|
end)).() |
|
|
|
|
|
|
|
|
|
api_path = |
|
|
|
|
"API_PATH" |
|
|
|
|
|> System.get_env("/") |
|
|
|
|
|> (&(if !String.ends_with?(&1, "/") do |
|
|
|
|
&1 <> "/" |
|
|
|
|
else |
|
|
|
|
&1 |
|
|
|
|
end)).() |
|
|
|
|
|
|
|
|
|
# General application configuration |
|
|
|
|
config :block_scout_web, |
|
|
|
|
namespace: BlockScoutWeb, |
|
|
|
@ -18,8 +36,8 @@ config :block_scout_web, BlockScoutWeb.Counters.BlocksIndexedCounter, enabled: t |
|
|
|
|
# Configures the endpoint |
|
|
|
|
config :block_scout_web, BlockScoutWeb.Endpoint, |
|
|
|
|
url: [ |
|
|
|
|
path: System.get_env("NETWORK_PATH") || "/", |
|
|
|
|
api_path: System.get_env("API_PATH") || "/" |
|
|
|
|
path: network_path, |
|
|
|
|
api_path: api_path |
|
|
|
|
], |
|
|
|
|
render_errors: [view: BlockScoutWeb.ErrorView, accepts: ~w(html json)], |
|
|
|
|
pubsub_server: BlockScoutWeb.PubSub |
|
|
|
|