Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
require 'dlcenter'
require 'dlcenter/thin_ipv6_host'

# Logs are read through Docker: don't let Ruby block-buffer them.
$stdout.sync = true

module DLCenter
class App < Sinatra::Base
helpers Sinatra::Streaming
Expand Down Expand Up @@ -177,6 +180,9 @@ def stream_download
end

get '/' do
# Always revalidate so a reload picks up the current frontend
# (stale tabs running old code can't be fixed server-side, fresh loads can).
headers 'Cache-Control' => 'no-cache'
File.read(settings.public_folder+'/index.html')
end

Expand Down
Loading