Use config_for for VAPID key storage (#34845)

This commit is contained in:
Matt Jankowski
2025-05-30 03:00:33 -04:00
committed by GitHub
parent a1c260696f
commit f7a3dd0e38
15 changed files with 42 additions and 40 deletions

17
config/vapid.yml Normal file
View File

@@ -0,0 +1,17 @@
# You can generate the private and public keys using the following task. You
# should only generate this once per instance. If you later decide to change it,
# all push subscriptions will be invalidated, requiring users to access the
# website again to resubscribe.
#
# Generate on the CLI:
# `bundle exec rails mastodon:webpush:generate_vapid_key`
#
# Generate via Docker Compose:
# `docker-compose run --rm web bundle exec rails mastodon:webpush:generate_vapid_key`
#
# For more information visit
# https://rossta.net/blog/using-the-web-push-api-with-vapid.html
#
shared:
private_key: <%= ENV.fetch('VAPID_PRIVATE_KEY', nil) %>
public_key: <%= ENV.fetch('VAPID_PUBLIC_KEY', nil) %>