Ver a proveniência

Fix for live view signing salt config error

master
Sean King há 2 meses
ascendente
cometimento
d7401bb631
Assinados por: seanking ID da chave GPG: 778810DE76B9460F
2 ficheiros alterados com 6 adições e 1 eliminações
  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 ficheiro

@ -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 ficheiro

@ -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 %>",

Carregando…
Cancelar
Guardar