Add web push support
This commit is contained in:
parent
d94ee5cd50
commit
04a48286e6
10 changed files with 155 additions and 7 deletions
|
|
@ -14,6 +14,8 @@ defmodule Mix.Tasks.GenerateConfig do
|
|||
|
||||
resultSql = EEx.eval_file("lib/mix/tasks/sample_psql.eex", dbpass: dbpass)
|
||||
|
||||
{web_push_public_key, web_push_private_key} = :crypto.generate_key(:ecdh, :prime256v1)
|
||||
|
||||
result =
|
||||
EEx.eval_file(
|
||||
"lib/mix/tasks/sample_config.eex",
|
||||
|
|
@ -21,7 +23,9 @@ defmodule Mix.Tasks.GenerateConfig do
|
|||
email: email,
|
||||
name: name,
|
||||
secret: secret,
|
||||
dbpass: dbpass
|
||||
dbpass: dbpass,
|
||||
web_push_public_key: Base.url_encode64(web_push_public_key, padding: false),
|
||||
web_push_private_key: Base.url_encode64(web_push_private_key, padding: false)
|
||||
)
|
||||
|
||||
IO.puts(
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ config :pleroma, Pleroma.Repo,
|
|||
hostname: "localhost",
|
||||
pool_size: 10
|
||||
|
||||
# Configure web push notifications
|
||||
config :web_push_encryption, :vapid_details,
|
||||
subject: "mailto:<%= email %>",
|
||||
public_key: "<%= web_push_public_key %>",
|
||||
private_key: "<%= web_push_private_key %>"
|
||||
|
||||
# Configure S3 support if desired.
|
||||
# The public S3 endpoint is different depending on region and provider,
|
||||
# consult your S3 provider's documentation for details on what to use.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue