backend: add trailing slash if needed
Otherwise we can redirect to something like this: https://console.redhat.com/api/pulp-content/public-copr-stage@copr/TEST1742912352410340284-storage-pulp/fedora-41-x86_64/
This commit is contained in:
parent
4ab30bdc37
commit
6d9ff9b5f2
1 changed files with 8 additions and 1 deletions
|
@ -52,7 +52,14 @@ function pulp_url(copr_path)
|
|||
if string.sub(copr_path, 1, 9) == "/results/" then
|
||||
copr_path = string.sub(copr_path, 10)
|
||||
end
|
||||
return pulp_content_url .. copr_path
|
||||
|
||||
local url = pulp_content_url
|
||||
if string.sub(url, -1) ~= "/" then
|
||||
url = url .. "/"
|
||||
end
|
||||
|
||||
url = url .. copr_path
|
||||
return url
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue