mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:11:42 +00:00
no fallar si el sitio todavía no se generó
This commit is contained in:
parent
77c16071bd
commit
475c393f46
1 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Gestiona las versiones privadas de los sitios. Solo se puede acceder
|
||||
# con una cuenta
|
||||
class PrivateController < ApplicationController
|
||||
|
@ -18,7 +20,7 @@ class PrivateController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
if deploy_private
|
||||
if deploy_private && File.exist?(path)
|
||||
send_file path, disposition: 'inline'
|
||||
else
|
||||
head :not_found
|
||||
|
@ -69,7 +71,7 @@ class PrivateController < ApplicationController
|
|||
'index.html'
|
||||
else
|
||||
'.' + params[:format].to_s
|
||||
end
|
||||
end
|
||||
|
||||
@file = @file.gsub('..', '/').gsub('./', '').squeeze('/')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue