Update authentication method

This commit is contained in:
2023-11-18 18:20:29 +11:00
parent 9d9ffc9122
commit 3b3ad66ba3
24 changed files with 273 additions and 25 deletions

View File

@@ -4,4 +4,12 @@ require "hanami/boot"
use Rack::Static, urls: ["/assets", "/media"], root: "public"
raise StandardError.new("No secret key") unless ENV["SESSION_SECRET"]
use Rack::Session::Cookie,
:domain => URI.parse(ENV["MICROPUB_SITE_URL"]).host,
:path => '/',
:expire_after => 3600*24,
:secret => ENV["SESSION_SECRET"]
run Hanami.app