JSON packages/screenshots set to fixed HTTPS

This commit is contained in:
Christoph Haas 2016-07-19 20:41:54 +02:00
parent e1f8ccec94
commit c719e35a09
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
json.cache! ['json_packages'], expires_in: 1.hour do
json.packages @p do |p|
json.extract! p, :maintainer, :name, :section, :maintainer_email, :homepage, :description
json.url package_url(p.name)
json.url url_for(p, protocol: 'https')
end
end

View file

@ -3,7 +3,7 @@ json.cache! ['json_screenshots'], expires_in: 1.hour do
p = s.package
json.extract! s, :version
json.extract! p, :maintainer, :name, :section, :maintainer_email, :homepage, :description
json.url package_url(p.name)
json.url url_for(p, protocol: 'https)
json.small_image_url "https://#{request.host_with_port}#{s.image.url(:thumb, timestamp: false)}"
json.large_image_url "https://#{request.host_with_port}#{s.image.url(:large, timestamp: false)}"
end