diff options
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/application.rb b/application.rb index a03d98c..5236685 100644 --- a/application.rb +++ b/application.rb @@ -1,10 +1,8 @@ -# frozen_string_literal: true - require 'uri' require 'base64' require 'digest/sha2' +require 'time' require 'rack/protection' -# require 'rack/contrib' require 'sinatra' SOCIAL_DIR = '/srv/social/' @@ -25,15 +23,13 @@ INBOX = { dir: File.join(SOCIAL_DIR, 'inbox') } OUTBOX = { dir: File.join(SOCIAL_DIR, 'outbox'), url: File.join(SOCIAL_URL, 'outbox') } TAGS = { dir: File.join(PUBLIC_DIR, 'tags'), url: File.join(SOCIAL_URL, 'tags') } FOLLOWERS_URL = 'https://social.pdp8.info/followers' +VISITED = File.join(INBOX[:dir], 'visited') +ACTIVITIES = %i[create announce follow accept undo delete like update move] CONTENT_TYPE = 'application/activity+json' # CONTENT_TYPE = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' use Rack::Protection -# use Rack::MailExceptions do |mail| -# mail.to 'info@pdp8.info' -# mail.smtp false -# end enable :sessions set :environment, :production |