summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-08-14 17:42:57 +0200
committerpdp8 <pdp8@pdp8.info>2023-08-14 17:42:57 +0200
commit8cb9bc7e4d516a27b4fe27ba0d0a9c40497e003d (patch)
treea6d9626b248849a5d620e644144880d8febb1df1 /application.rb
parent9781dda58c3d2926f928544a8155d493fc2f1ca2 (diff)
undo/delete activities for outbox posts, cleanup
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/application.rb b/application.rb
index 8a62fdd..a03d98c 100644
--- a/application.rb
+++ b/application.rb
@@ -3,6 +3,8 @@
require 'uri'
require 'base64'
require 'digest/sha2'
+require 'rack/protection'
+# require 'rack/contrib'
require 'sinatra'
SOCIAL_DIR = '/srv/social/'
@@ -27,7 +29,14 @@ FOLLOWERS_URL = 'https://social.pdp8.info/followers'
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
set :session_secret, File.read('.secret').chomp
set :default_content_type, CONTENT_TYPE
set :port, 9292