Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/admin/stylesheets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def show

def create
Stylesheet.temporary(current_account, params[:url]) do
redirect_to "/" + Stylesheet.capture("http://#{MY_DOMAIN}/", cookies)
redirect_to "/" + Stylesheet.capture("https://#{MY_DOMAIN}/", cookies)
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/atom_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def atom_comments_link(content, url)
str = <<-EOS
<p>
<strong>Commentaires :</strong>
<a href=\"//#{MY_DOMAIN}/nodes/#{content.node.id}/comments.atom\">voir le flux Atom</a>
<a href=\"https://#{MY_DOMAIN}/nodes/#{content.node.id}/comments.atom\">voir le flux Atom</a>
<a href=\"#{url}#comments\">ouvrir dans le navigateur</a>
</p>
EOS
Expand Down
2 changes: 1 addition & 1 deletion app/models/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def src(type="img")
return link if internal_link?
return E403 if blacklisted?
register_in_redis
"//#{IMG_DOMAIN}/#{type}/#{encoded_link}/#{filename}"
"https://#{IMG_DOMAIN}/#{type}/#{encoded_link}/#{filename}"
end

def src_attr
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def custom_avatar_url=(url)
before_validation :validate_url
def validate_url
return if custom_avatar_url.blank?
return if custom_avatar_url.starts_with?("//")
return if custom_avatar_url.starts_with?("https://")
errors.add(:url, "Adresse de téléchargement d’avatar non valide")
end

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/avatar_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class AvatarUploader < CarrierWave::Uploader::Base

AVATAR_SIZE = 64
DEFAULT_AVATAR_URL = "//#{MY_DOMAIN}/images/default-avatar.svg"
DEFAULT_AVATAR_URL = "https://#{MY_DOMAIN}/images/default-avatar.svg"

include CarrierWave::MiniMagick
process resize_and_pad: [AVATAR_SIZE, AVATAR_SIZE]
Expand All @@ -13,7 +13,7 @@ def base_dir
end

def url
super.sub(base_dir.to_s, "//#{IMG_DOMAIN}")
super.sub(base_dir.to_s, "https://#{IMG_DOMAIN}")
end

def store_dir
Expand Down
2 changes: 1 addition & 1 deletion app/uploaders/stylesheet_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def base_dir
end

def url
super.sub(base_dir.to_s, "//#{IMG_DOMAIN}")
super.sub(base_dir.to_s, "https://#{IMG_DOMAIN}")
end

def store_dir
Expand Down
2 changes: 1 addition & 1 deletion app/views/stylesheets/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Pour cela, il vous suffit de commencer votre feuille de style par la déclaration suivante :

%pre
@import url("//#{MY_DOMAIN}/assets/application.css");
@import url("https://#{MY_DOMAIN}/assets/application.css");

%div.sideforms
= form_tag "/stylesheet", method: :put do
Expand Down