Disable sessions for endpoints that do not require them
All checks were successful
Gitea Actions Demo / lint (push) Successful in 1m21s
Gitea Actions Demo / test (push) Successful in 1m20s
Gitea Actions Demo / release-image (push) Successful in 1m4s

This commit is contained in:
Ryan Cavicchioni 2024-08-17 13:52:59 -05:00
parent ac5f98d865
commit 83a6152472
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

1
app.rb
View File

@ -206,6 +206,7 @@ before do
# content_type 'text/plain'
sleep(1) while Sleep.instance.asleep? && request.path_info != "/livez/sleep"
content_type :text if request.path_info.start_with? "/_cat"
request.session_options[:skip] = !request.path_info.start_with?("/session")
end
get "/" do