Explorar el Código

Fix for live view signing salt config error

master
Sean King hace 2 meses
padre
commit
d7401bb631
Firmado por: seanking ID de clave GPG: 778810DE76B9460F
Se han modificado 2 ficheros con 6 adiciones y 1 borrados
  1. +4
    -0
      lib/mix/tasks/fuck_gab/config.ex
  2. +2
    -1
      priv/templates/sample_config.eex

+ 4
- 0
lib/mix/tasks/fuck_gab/config.ex Ver fichero

@ -108,6 +108,9 @@ defmodule Mix.Tasks.FuckGab.Config do
secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64)
signing_salt = :crypto.strong_rand_bytes(8) |> Base.encode64() |> binary_part(0, 8)
live_view_signing_salt =
:crypto.strong_rand_bytes(8) |> Base.encode64() |> binary_part(0, 8)
template_dir = Application.app_dir(:fuck_gab, "priv") <> "/templates"
result_config =
@ -123,6 +126,7 @@ defmodule Mix.Tasks.FuckGab.Config do
dbpass: dbpass,
secret: secret,
signing_salt: signing_salt,
live_view_signing_salt: live_view_signing_salt,
listen_ip: listen_ip,
listen_port: listen_port
)

+ 2
- 1
priv/templates/sample_config.eex Ver fichero

@ -13,7 +13,8 @@ config :fuck_gab, FuckGabWeb.Endpoint,
url: [host: "<%= domain %>", scheme: "https", port: <%= port %>],
http: [ip: {<%= String.replace(listen_ip, ".", ", ") %>}, port: <%= listen_port %>],
secret_key_base: "<%= secret %>",
signing_salt: "<%= signing_salt %>"
signing_salt: "<%= signing_salt %>",
live_view: [signing_salt: "<%= live_view_signing_salt %>"]
config :fuck_gab, :instance,
site_name: "<%= site_name %>",

Cargando…
Cancelar
Guardar