This commit is contained in:
yystopf 2021-12-22 18:08:10 +08:00
parent 0083ef33cb
commit 05c3f60dab
1 changed files with 2 additions and 2 deletions

View File

@ -238,14 +238,14 @@ class RepositoriesController < ApplicationController
def archive
domain = Gitea.gitea_config[:domain]
api_url = Gitea.gitea_config[:base_url]
archive_url = "/repos/#{@owner.login}/#{@repository.identifier}/archive/#{URI.escape(params[:archive])}"
archive_url = "/repos/#{@owner.login}/#{@repository.identifier}/archive/#{params[:archive]}"
file_path = [domain, api_url, archive_url].join
file_path = [file_path, "access_token=#{current_user&.gitea_token}"].join("?") if @repository.hidden?
return render_not_found if !request.format.zip? && !request.format.gzip?
redirect_to file_path
redirect_to URI.escape(file_path)
end
def raw