Fix build logs on Safari by having the client JS handle the redirect manually, rather than the browser itself; Safari doesn't support 302 redirects to another domain inside an XHR.
This commit is contained in:
parent
2b9902b72c
commit
d6a1493d52
3 changed files with 68 additions and 35 deletions
|
@ -288,9 +288,11 @@ class RepositoryBuildLogs(RepositoryParamResource):
|
|||
build.repository.namespace_user.username != namespace):
|
||||
raise NotFound()
|
||||
|
||||
# If the logs have been archived, just redirect to the completed archive
|
||||
# If the logs have been archived, just return a URL of the completed archive
|
||||
if build.logs_archived:
|
||||
return redirect(log_archive.get_file_url(build.uuid))
|
||||
return {
|
||||
'logs_url': log_archive.get_file_url(build.uuid)
|
||||
}
|
||||
|
||||
start = int(request.args.get('start', 0))
|
||||
|
||||
|
|
Reference in a new issue